02.07.2011, 04:06
Quote:
Exemplo:
pawn Код:
pawn Код:
|
assim darб erro, aconselho fazer:
pawn Код:
new pLevel[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/MeuComando", cmdtext, true) == 0)
{
if(pLevel[playerid] == 1)
{
SendClientMessage(playerid, -1, "Vocк й level 1!");
}
else
{
SendClientMessage(playerid, -1, "Vocк nгo й level 1 para usar este comando.");
}
return true;
}
return false;
}
esta й uma correзгo sem prestar a atenзгo.
tutorial ele EXPLICA COMO FAZ e nгo explica PRA QUE SERVE A FUNЗГO.
Quote:
-1 indica a cor que a mensagem terб ao ser enviada ao jogador. Neste caso, ela serб branca.
#TOPIC Bom tutorial. OBS: Nгo existe sу o for para fazer loop. Tem tambйm o while e outras formas. |
pawn Код:
new i;
do
{
printf(i);
++i;
}
while(i <= GetMaxPlayers());
pawn Код:
new i;
public OnPlayerUpdate(playerid)
{
if(!strcmp(i,GetMaxPlayers())) return 0;
return ++i, OnPlayerUpdate(playerid), true;
}