Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:su(playerid,params[])
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pDuty] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " Niste na duznosti (/duty)!");
- return 1;
- }
- new string[128], giveplayerid, giveplayer[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME],result[64];
- if(sscanf(params, "us[64]", giveplayerid,result)) return SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /su [playerID/DeoImena][zlocin]");
- if(PlayerInfo[playerid][pDBanned] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "** Banovani ste sa policijske duznosti!");
- return 1;
- }
- if (IsACop(playerid) || IsAFreecop(playerid))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid,sendername,sizeof(sendername));
- if(IsACop(giveplayerid))
- {
- if(PlayerInfo[playerid][pRank] >= 6)
- {
- if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 6; }
- else { WantedPoints[giveplayerid]+= 2; }
- SetPlayerCriminalEx(giveplayerid,playerid, result);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* Morate biti rank 6 ili reci da bi mogli da date wanted policajcu");
- return 1;
- }
- }
- else if(IsAFreecop(giveplayerid))
- {
- if(PlayerInfo[playerid][pRank] >= 3)
- {
- if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 6; }
- else { WantedPoints[giveplayerid]+= 2; }
- SetPlayerCriminalEx(giveplayerid,playerid, result);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* Morate biti rank 3 da bi dali wanted obezbedjenju.");
- return 1;
- }
- }
- else
- {
- if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 6; }
- else { WantedPoints[giveplayerid]+= 2; }
- SetPlayerCriminalEx(giveplayerid,playerid, result);
- }
- new y, m, d;
- new h,mi,s;
- getdate(y,m,d);
- gettime(h,mi,s);
- format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /suspect %s %s",d,m,y,h,mi,s,sendername, giveplayer, (result));
- CommandLog(string);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "** Ne mozete dati wanted policajcu !");
- }
- }
- }
- else
- {
- format(string, sizeof(string), "** %d igrac nije aktivan.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "** You are not a Cop / FBI / Nacionalna Garda !");
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement