Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- FILTERSCRIPT
- Wanted Level
- Shomy
- */
- #include < a_samp >
- #include < zcmd >
- #include < sscanf2 >
- #include < foreach >
- #define COL_SERVER "{FF8000}"
- #define BELA "{FFFFFF}"
- #define SCM SendClientMessage
- #define CRVENA 0xAA3333AA
- new WL[MAX_PLAYERS];
- new Policajac[MAX_PLAYERS];
- forward DEPchat(color, string[]);
- public DEPchat(color, string[])
- {
- foreach(Player,i)
- {
- if(Policajac[i] == 1)
- {
- SCM(i, color, string);
- printf("%s", string);
- }
- }
- }
- stock GetName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- CMD:su(playerid, params[])
- {
- new id, wlevel, msg[128], msg1[128], razlog;
- if(Policajac[playerid] == 1)
- {
- if(sscanf(params, "uds[80]", id, wlevel, razlog)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Koristite /su [ID] [Wanted Level 1-7] [Razlog]");
- if(wlevel > 7 || wlevel < 1) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Wanted Level ne moze biti veci od 7 ili manji od 1 !");
- if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac nije na serveru !");
- if(id == playerid) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Ne mozete dati Wanted Level samom sebi !");
- if(Policajac[id] == 1) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac je policajac !");
- if(WL[id] > 6) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac vec ima WL 7 !");
- else
- {
- WL[id] = wlevel;
- format(msg,sizeof(msg), ""COL_SERVER"[ Wanted Level ] "BELA"Policajac %s je dao Wanted Level %d igracu %s. Razlog %s.", GetName(playerid), wlevel, GetName(id), razlog);
- DEPchat(-1, msg);
- format(msg1,sizeof(msg1), ""COL_SERVER"[ Wanted Level ] "BELA"Policajac %s Vam je dao Wanted Level %d. Razlog %s.",GetName(playerid), wlevel, razlog);
- SCM(id, -1, msg1);
- SetPlayerColor(id, CRVENA);
- }
- }
- else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste ovlasceni !");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement