11.11.2011, 16:53
pawn Код:
//----------------------------------[SetCrim]-----------------------------------------------
if(strcmp(cmd, "/suspeito", true) == 0 || strcmp(cmd, "/su", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um policial!");
return 1;
}
if(OnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo Bateu o cartгo!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/su)speito [id] [Descriзгo do Crime]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsACop(playerid))
{
if(IsPlayerConnected(giveplayerid))
{
if(IsACop(giveplayerid))
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar su em Policiais!");
return 1;
}
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: (/su)speito [id] [Descriзгo do Crime]");
return 1;
}
SetPlayerCriminal(giveplayerid,playerid, result);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Esse jogador nгo estб conectado.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Vocк nгo й um Policial !");
}
}
return 1;
}