28.01.2013, 00:43
Olб queria um CMD que tiras-ce os niveis de policia de certa pessoa /desfichar [ID] tipo assim so para admins
CMD:retirarsu(playerid, params[])
{
new giveplayerid, string[125], name[24], name2[24];
if(IsPlayerAdmin(playerid))
{
if(sscanf(params, "usd", giveplayerid)) return SendClientMessage(playerid,WHITE,"Digite /retirarsu [ID]");
else if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid,WHITE,"Jogador OFF-Line");
else
{
GetPlayerName(giveplayerid, name, sizeof(name));
GetPlayerName(playerid, name2, sizeof(name2));
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, 0);
format(string, sizeof(string), "Admin [%s] Retirou Os Suspeitos do Jogador [%s]", name2, name);
SendClientMessageToAll(SUACOR, string);
}
}
else return SendClientMessage(playerid, -1, "Comando Invalido !");
return 1;
}
if(strcmp(cmd, "/retirarsu", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Digite: /tirarsu [id]");
return true;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
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, "Digite: /tirarsu [id]");
return true;
}
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, 0);
return true;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Jogador OFF - Line");
return true;
}
}
}
return true;
}
Sу Era Procurar ai, tinha um tуpico quase agora
ZCMD PHP Code:
PHP Code:
|