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