Postagens populares

segunda-feira, 21 de março de 2011

[Code]CMD: /mostrarrg [Intermediário]

if(strcmp(cmd, "/mostrarrg",true) == 0)
{
tmp = strtok(cmdtext, idx);
new plname[MAX_PLAYER_NAME];
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Uso: /mostrarrg [id]");
}
new info;
info = ReturnUser(tmp);
if (ProxDetectorS(10.0, playerid,info))
{
ShowStats(info, playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(info, plname, sizeof(plname));
format(string, sizeof(string), "* %s mostra seu rg para %s.", sendername, plname);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}

[Tutorial]Fazendo um comando [Iniciante]

Na public OnPlayerCommandText
if(strcmp("/meucomando", true) == 0)
{
Funçao(playerid);
return 1;
}