02.10.2013, 06:25
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/Creditos", true))
{
SendClientMessage(playerid, COR_AMARELO,"Creditos: ");
SendClientMessage(playerid, COR_AMARELO,"GameMode feito totalmente por: Mr_Gato e JhowFreelancer.");
return 1;
}
else if(!strcmp(cmdtext, "/Reparar", true))
if (!IsPlayerInAnyVehicle (playerid))
return SendClientMessage (playerid, COR_VERMELHO, "[ERRO]: Vocк nгo estб em um veнculo!");
RepairVehicle (GetPlayerVehicleID (playerid));
SendClientMessage (playerid, COR_VERMELHO, "[ERRO]: Comando Invalido Digite /Comandos .");
return true;
}
else if(!strcmp(cmdtext, "/kill", true))
(
SetPlayerHealth(playerid,0);
}
Observe..
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
Olha vocк usou "(" ao invйs de "{"
https://sampforum.blast.hk/showthread.php?tid=428964