15.12.2014, 18:53
The player give double wanted And i give him wanted when is in the jail.
I want player give corect wanted he have 1 wanted i give him 1 wanted = 2 wanted no 4 and i want dont give him wanted when is in the jail
Sorry for my bag english.
I want player give corect wanted he have 1 wanted i give him 1 wanted = 2 wanted no 4 and i want dont give him wanted when is in the jail
Sorry for my bag english.
Код:
if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/su)spect [playerid/PartOfName] [WantedLevel] [crime discription]"); return 1; } giveplayerid = ReturnUser(tmp); if (IsACop(playerid)) { if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(!IsACop(giveplayerid)) { 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, "USAGE: (/su)spect [playerid/PartOfName] [WantedLevel] [crime text]"); return 1; } WantedPoints[giveplayerid] += 2; SetPlayerCriminal(giveplayerid,playerid, result); return 1; } else { SendClientMessage(playerid, COLOR_GRAD2, " Nu poti suspecta un politist !"); } } } else { format(string, sizeof(string), " %d is not an active player.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); return 1; } } else { SendClientMessage(playerid, COLOR_GRAD2, " Nu faci parte dintr-un Departament"); } } return 1; }