03.11.2013, 02:36
Fiz esse comando mas se eu tento usar no id 15 por exemplo, seta no 0, sempre seta no 0
pawn Код:
if(strcmp(cmd, "/requisitarprisaoteste", true) == 0 || strcmp(cmd, "/rprisaoteste", true) == 0)
{
if (PlayerInfo[playerid][pLider] == 7 || PlayerInfo[playerid][pCargo] == 200 || PlayerInfo[playerid][pCargo] == 100)
{
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, "USE: /rprisao [ID][Motivo]");
return true;
}
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode mandar prender a si mesmo");
return 1;
}
SetPlayerCriminal(giveplayerid,playerid, result);
format(string, sizeof(string), "O Prefeito requisitou a prisгo imediata de %s. Orgs policiais entrarгo em aзгo...", giveplayer);
SendClientMessageToAll(COLOR_GRAD1, string);
return true;
}
}
return true;
}