[Pomoc] cmd /levelupall


Započeo kico24, Mart 03, 2013, 18:31:55 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

kico24

Skripta koju koristim: NBE
Detaljan opis problema: Koristim NBE mod i nemam komandu /levelupall a hocu da imam tu komandu neznam kako da je ubacim a treba mi svim igracima da dam level kad zatreba hitno je ? :/
Pozz

kico24


Citat: LV | Cvelle :) poslato Mart 03, 2013, 18:54:01 POSLE PODNE
CMD:levelupall(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
		foreach(Player, i)
		{
			if(IsPlayerConnected(i))
			{
				if(PlayerInfo[playerid][pOSC] >= 1340)
				{
					PlayerInfo[i][pLevel] += 1;
					OnPlayerUpdateEx(i);
					SCM(i,COLOR_BLUE, "LEVEL UP ALL !!!");
				}
				else
				{
					SCM(playerid, COLOR_GRAD1, "** Niste ovlasceni da koristite ovu komandu!");
				}
			}
		}
	}
	return 1;
}

Cvele to je samo da njemu da onda 1 vise lvl


Evo ti ovako probaj,mora da radi :) Stavio sam ti ovo za osc-a samo ubaci ;)

if (strcmp("/givemoneyall", cmdtext, true, 10) == 0)
    {
		if(IsPlayerConnected(playerid))
		{
       		if (PlayerInfo[playerid][pOSC] >= 1340)
        	{
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /givemoneyall [novac]");
					return 1;
				}
        		new money;
				money = strval(tmp);
                foreach (Player, i)
				{
					JBC_GivePlayerMoney(i,money);
				}
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "Dali ste svim igracima %d $",money);
				SendClientMessage(playerid,COLOR_WHITE,string);
				format(string, sizeof(string), "OSC %s je dao %d $ svim igracima !",sendername,money);
				SendClientMessageToAll(COLOR_PURPLE,string);
			}
  			else
  			{
				SendClientMessage(playerid, COLOR_WHITE, "   Niste ovlasteni da koristite tu komandu !");
			}
		}
		return 1;
	}

kico24

dobro giveallmoney ja trazim komandu levelupall :D ?  :'(