06.04.2014, 12:30
PHP код:
if(strcmp(cmd, "/tirarsu", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= AKI VC SETA O ADMIN OU TIRA ESSA LINHA PARA O JOGADOR)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/tirarsu) [id] 0");
return true;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
//new playerid;
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/tirarsu [id] 0");
return true;
}
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, 0);
return true;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Esse jogador nгo estб conectado.");
return true;
}
}
}
return true;
}