SHOW:
|
|
- or go back to the newest paste.
1 | - | //Discret Admin By GTA// |
1 | + | //Discret Admin By GTA |
2 | - | /DiscretAdmin by GTA |
2 | + | |
3 | #include <sscanf> | |
4 | #include <double-o-Files> | |
5 | #define FILTERSCRIPT | |
6 | #include <zcmd> | |
7 | ||
8 | ||
9 | #define COLOR_GREY 0xAFAFAFAA | |
10 | #define COLOR_GREEN 0x33AA33AA | |
11 | #define COLOR_RED 0xAA3333AA | |
12 | #define COLOR_YELLOW 0xFFFF00AA | |
13 | #define COLOR_WHITE 0xFFFFFFAA | |
14 | #define COLOR_ADMIN 0xFF0000AA | |
15 | #define COLOR_DARKBLUE 0x300FFAAB | |
16 | #define COLOR_BLUEGREEN 0x46BBAA00 | |
17 | #define COLOR_PINK 0xFF66FFAA | |
18 | #define COLOR_BLUE 0x0000BBAA | |
19 | #define COLOR_LIGHTBLUE 0x33CCFFAA | |
20 | ||
21 | #define SCM SendClientMessage | |
22 | ||
23 | #pragma unused strtok | |
24 | #pragma unused ret_memcpy | |
25 | ||
26 | new Discret[MAX_PLAYERS]; | |
27 | new Mute[MAX_PLAYERS]; | |
28 | new UnMutex; | |
29 | new Warn[MAX_PLAYERS]; | |
30 | new Text:Ann; | |
31 | ||
32 | stock PlayerName(playerid) | |
33 | { | |
34 | new name[124]; | |
35 | GetPlayerName(playerid,name,sizeof(name)); | |
36 | return name; | |
37 | } | |
38 | ||
39 | stock PlayerIP(playerid) | |
40 | { | |
41 | new ajpi[16]; | |
42 | GetPlayerIp(playerid, ajpi, sizeof(ajpi)); | |
43 | return ajpi; | |
44 | } | |
45 | ||
46 | stock SendClientMessageToDiscret(color, msg[]) | |
47 | { | |
48 | for(new a;a<GetMaxPlayers();a++) | |
49 | { | |
50 | if(IsPlayerConnected(a) && Discret[a]) | |
51 | ||
52 | { | |
53 | SendClientMessage(a,color,msg); | |
54 | } | |
55 | } | |
56 | return 1; | |
57 | } | |
58 | ||
59 | public OnFilterScriptInit() | |
60 | { | |
61 | print("\n--------------------------------------"); | |
62 | print(" Discret Admin 2012 By GTA"); | |
63 | print("--------------------------------------\n"); | |
64 | Ann = TextDrawCreate(319.000000, 326.000000," "); | |
65 | TextDrawUseBox(Ann, 1); | |
66 | TextDrawBoxColor(Ann, COLOR_WHITE); | |
67 | TextDrawTextSize(Ann, 32.000000,378.000000); | |
68 | TextDrawAlignment(Ann, 2); | |
69 | TextDrawBackgroundColor(Ann, 0x000000ff); | |
70 | TextDrawFont(Ann, 2); | |
71 | TextDrawLetterSize(Ann, 0.399999,1.000000); | |
72 | TextDrawColor(Ann, 0xffffffff); | |
73 | TextDrawSetShadow(Ann, 1); | |
74 | SetTimer("Cosie",500000,1); | |
75 | ||
76 | return 1; | |
77 | } | |
78 | public OnFilterScriptExit() | |
79 | { | |
80 | DOF_Exit(); | |
81 | return 1; | |
82 | } | |
83 | public OnPlayerText(playerid, text[]) | |
84 | { | |
85 | if(Mute[playerid] == 1) | |
86 | ||
87 | ||
88 | { | |
89 | SendClientMessage(playerid,COLOR_YELLOW,"Ne mozes pisati !"); | |
90 | return 0; | |
91 | ||
92 | ||
93 | } | |
94 | return 1; | |
95 | } | |
96 | ||
97 | public OnPlayerConnect(playerid) | |
98 | { | |
99 | SendClientMessage(playerid,COLOR_GREEN," System/Script Discret Admina By GTA. /dspomoc !"); | |
100 | Discret[playerid] = 0; | |
101 | Mute[playerid] = 0; | |
102 | Warn[playerid] = 0; | |
103 | return 1; | |
104 | } | |
105 | ||
106 | public OnPlayerDisconnect(playerid, reason) | |
107 | { | |
108 | Discret[playerid] = 0; | |
109 | Mute[playerid] = 0; | |
110 | Warn[playerid] = 0; | |
111 | return 1; | |
112 | } | |
113 | ||
114 | CMD:dspomoc(playerid,params[]) | |
115 | { | |
116 | if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_GREEN,"RCON Admin !"); | |
117 | new string[300]; | |
118 | strcat(string,"Komande RCON'a\n"); | |
119 | strcat(string,"/discretadd [ID] - Igrac se prijavi i dodas ga u Discret Admina\n"); | |
120 | strcat(string,"/discret [ID] - Dodas igraca u Discret dnevnik kao Discret Admina\n"); | |
121 | strcat(string,"/discretoff [ID] - \n"); | |
122 | strcat(string,"/discretpass [Haso] - Odjavis igraca iz Discret dnevnika Admina\n"); | |
123 | ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Komande za RCON Admina by GTA",string,"OK","OK"); | |
124 | return 1; | |
125 | } | |
126 | CMD:dsomoc(playerid,params[]) | |
127 | { | |
128 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
129 | new string[1024]; | |
130 | strcat(string,"Komande za Discret Admina:\n"); | |
131 | strcat(string,"/dban [ID] [Razlog] - Banujes igraca\n"); | |
132 | strcat(string,"/dkick [ID] [Razlog] - Kikujes igraca\n"); | |
133 | strcat(string,"/dmute [ID] [Period] - Mutiras igraca\n"); | |
134 | strcat(string,"/dunmute [ID] - Odmutiras igraca\n"); | |
135 | strcat(string,"/dwarn [ID] [Razlog] - Dajes upozorenje igracu\n"); | |
136 | strcat(string,"/dunwarn [ID] - Skidas upozorenje igracu\n"); | |
137 | strcat(string,"/givemoney [ID] [Kolicina] - Dajes igracu pare\n"); | |
138 | strcat(string,"/givemoneyall [Kolicina] - Dajes svim igracima pare\n"); | |
139 | strcat(string,"/dheal [ID] - Lijecis igraca\n"); | |
140 | strcat(string,"/darmor [ID] - Dajes pancir igracu\n"); | |
141 | strcat(string,"/dexplode [ID] - Igracu izvodite eksplozije\n"); | |
142 | strcat(string,"/dtt [ID] - Teleportujete se do igraca\n"); | |
143 | strcat(string,"/dth [ID] - Teleportujete igraca sebi\n"); | |
144 | strcat(string,"/dgivegun [ID] [ID oruzija] [Kolicina metaka] - Dajes igracu oruzije\n"); | |
145 | strcat(string,"/dgivegunall [ID oruzija] [Kolicina metaka] - Dajes svim igracima oruzije\n"); | |
146 | strcat(string,"/dinfo [ID] - Informacije o igracu\n"); | |
147 | strcat(string,"/dsay [Tekst] - Pises na cetu kao Discret admin\n"); | |
148 | strcat(string,"/dsethp [ID] [Kolicina HP-a] - Podesavate HP igraci\n"); | |
149 | strcat(string,"/dsetarmor [ID] [Kolicina snage pancira] - Podesavete pancir igracu\n"); | |
150 | strcat(string,"/d [Tekst] - Govoris u chat Discret admina\n"); | |
151 | strcat(string,"/dkillp [ID] - Ubi igraca\n"); | |
152 | strcat(string,"/dann [Tekst] - Pises po ekranu\n"); | |
153 | strcat(string,"Lista Komandu 2 pod: /dspomoc2\n"); | |
154 | ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Komade Discret Admina by GTA",string,"OK","OK"); | |
155 | return 1; | |
156 | } | |
157 | CMD:dspomoc2(playerid,params[]) | |
158 | { | |
159 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
160 | new string[1024]; | |
161 | strcat(string,"Komande Discret Admina (2):\n"); | |
162 | strcat(string,"/dhealall - Dajes svima pun HP\n"); | |
163 | strcat(string,"/darmorall - Dajes svima pancir\n"); | |
164 | strcat(string,"/dethpall [Kolicina HP-a] - Postavljas kolicinu HP-a igracu\n"); | |
165 | strcat(string,"/detarmorall [Kolicina snage pancira] - Postavljas kolicinu snage pancira igracu\n"); | |
166 | strcat(string,"/dhpadd [ID] - Dajesz Graczu +10HP\n"); | |
167 | strcat(string,"/dlap [ID] - Dajes/Oduzimas igracu -10 HP-a\n"); | |
168 | strcat(string,"/dadmins - Konektovani Discret Admini\n"); | |
169 | strcat(string,"/killall - Ubijas sve igrace\n"); | |
170 | strcat(string,"/dinvisible - Niko vas ne vidi na mapi\n"); | |
171 | strcat(string,"/dvisible - Svi vas vide na mapi\n"); | |
172 | strcat(string,"/dcz - Discret Admin chat\n"); | |
173 | strcat(string,"/dfix - Popravljas svoje vozilo\n"); | |
174 | strcat(string,"/dfixall - Popravis svima vozilo/y\n"); | |
175 | ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Komande Discret Admina (2) By GTA",string,"OK","OK"); | |
176 | return 1; | |
177 | } | |
178 | CMD:dslogin(playerid,cmdtext[]) | |
179 | { | |
180 | if(isnull(cmdtext)) return SendClientMessage(playerid,COLOR_GREEN,"/dslogin [Sifra]"); | |
181 | if(Discret[playerid] == 1) return SendClientMessage(playerid,COLOR_ADMIN,"Ulogovan si kao Discret Admin !"); | |
182 | ||
183 | new tmp[256]; | |
184 | new playername[MAX_PLAYER_NAME]; | |
185 | GetPlayerName(playerid,playername,sizeof(playername)); | |
186 | tmp = DOF_GetString("Discret.ini",playername); | |
187 | new Log = strval(tmp); | |
188 | ||
189 | if(Log < 1) | |
190 | ||
191 | ||
192 | { | |
193 | SendClientMessage(playerid,COLOR_ADMIN,"Je izbacen sa servera!Razlog:Neovlascena prijava kao Discret Admin !"); | |
194 | Kick(playerid); | |
195 | ||
196 | ||
197 | } | |
198 | ||
199 | if(DOF_FileExists("Discret.ini")) | |
200 | ||
201 | ||
202 | { | |
203 | if(strcmp(cmdtext,DOF_GetString("Discret.ini","Sifra"),true)==0) | |
204 | ||
205 | ||
206 | { | |
207 | Discret[playerid] = 1; | |
208 | new string[124]; | |
209 | format(string,sizeof(string),"Ulogovan si kao Discret Admin.\nSve komande mozes naci pod /dspomoc",PlayerName(playerid)); | |
210 | ShowPlayerDialog(playerid,2,0,"Ulogovan si !",string,"OK","OK"); | |
211 | new printx[124]; | |
212 | format(printx,sizeof(printx),"%s - je ulogovan kao Discret Admin",PlayerName(playerid)); | |
213 | print(printx); | |
214 | ||
215 | ||
216 | } | |
217 | else | |
218 | ||
219 | ||
220 | { | |
221 | new xx[124]; | |
222 | format(xx,sizeof(xx),"Sifra: %s je netacna !",cmdtext); | |
223 | ShowPlayerDialog(playerid,2,0,"Pogresna sifra",xx,"OK","OK"); | |
224 | ||
225 | ||
226 | } | |
227 | ||
228 | ||
229 | } | |
230 | else | |
231 | ||
232 | ||
233 | { | |
234 | DOF_CreateFile("Discret.ini"); | |
235 | DOF_SetString("Discret.ini","Sifra","Sifra"); | |
236 | new c = 1; | |
237 | DOF_SetInt("Discret.ini",PlayerName(playerid),c); | |
238 | ||
239 | ||
240 | ||
241 | } | |
242 | return 1; | |
243 | } | |
244 | CMD:discretadd(playerid,params[]) | |
245 | { | |
246 | if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Discret Admin !"); | |
247 | new id = strval(params); | |
248 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Koristi: /discret [ID]"); | |
249 | if(!IsPlayerConnected(id)) return SCM(playerid,-1,"Igrac nije konektovan !"); | |
250 | new string[124]; | |
251 | Discret[id] = 1; | |
252 | ||
253 | DOF_SetString("Discret.ini",PlayerName(id),"1"); | |
254 | ||
255 | format(string,sizeof(string),"Admin %s (id: %d) prijavi se kao Discret Admin!",PlayerName(playerid),playerid); | |
256 | SendClientMessage(id,COLOR_ADMIN,string); | |
257 | format(string,sizeof(string),"Prijavi i dodaj %s u listu Discret Admin.",PlayerName(id)); | |
258 | SendClientMessage(playerid,COLOR_GREEN,string); | |
259 | return 1; | |
260 | } | |
261 | CMD:discret(playerid,params[]) | |
262 | { | |
263 | if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Discret Admin!"); | |
264 | new id = strval(params); | |
265 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Koristi: /discret [ID]"); | |
266 | if(!IsPlayerConnected(id)) return SCM(playerid,-1,"Nie Ma Takiego Gracza !"); | |
267 | Discret[id] = 1; | |
268 | new string[124]; | |
269 | format(string,sizeof(string),"Admin %s (id: %d) dodaj igraca u listu Discret Admina!",PlayerName(playerid),playerid); | |
270 | SendClientMessage(id,COLOR_ADMIN,string); | |
271 | format(string,sizeof(string),"Dodao si igraca u listu Discret Admina !",PlayerName(id)); | |
272 | SendClientMessage(playerid,COLOR_GREEN,string); | |
273 | print(string); | |
274 | return 1; | |
275 | } | |
276 | CMD:discretoff(playerid,params[]) | |
277 | { | |
278 | if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Discret Admin!"); | |
279 | new id = strval(params); | |
280 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Koristi: /discretoff [ID]"); | |
281 | if(!IsPlayerConnected(id)) return SCM(playerid,-1,"Igrac nije konektovan !"); | |
282 | Discret[id] = 0; | |
283 | new string[124]; | |
284 | format(string,sizeof(string),"Admin %s (id: %d) ukloni igracu Discret Admina !",PlayerName(playerid),playerid); | |
285 | SendClientMessage(id,COLOR_GREEN,string); | |
286 | format(string,sizeof(string),"Igrac je izbrizan iz liste Discret Admin!",PlayerName(id)); | |
287 | SendClientMessage(playerid,COLOR_GREEN,string); | |
288 | print(string); | |
289 | return 1; | |
290 | } | |
291 | CMD:discretpass(playerid,cmdtext[]) | |
292 | { | |
293 | if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Discret Admin!"); | |
294 | if(isnull(cmdtext)) return SCM(playerid,-1,"Koristi: /discretpass [Sifra] "); | |
295 | DOF_SetString("Discret.ini","Sifra",cmdtext); | |
296 | new string[124]; | |
297 | format(string,sizeof(string),"Discret Admin sifra promijenjena na:%s",cmdtext); | |
298 | SendClientMessage(playerid,COLOR_GREEN,string); | |
299 | return 1; | |
300 | } | |
301 | CMD:dban(playerid,cmdtext[]) | |
302 | { | |
303 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
304 | ||
305 | new id,powod[64]; | |
306 | if(sscanf(cmdtext,"ds",id,powod)) return SendClientMessage(playerid,-1,"Koristi: /dban [ID] [Razlog]"); | |
307 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
308 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, " Igrac nije konektovan!"); | |
309 | ||
310 | new Banx[MAX_PLAYER_NAME]; | |
311 | GetPlayerName(id,Banx,sizeof(Banx)); | |
312 | new string[124]; | |
313 | format(string,sizeof(string),"Igrac %s je banovan od strane Discret Admin! Razlog:s.",Banx,powod); | |
314 | SendClientMessageToAll(COLOR_ADMIN,string); | |
315 | print(string); | |
316 | BanEx(id,powod); | |
317 | ||
318 | return 1; | |
319 | } | |
320 | CMD:dkick(playerid,cmdtext[]) | |
321 | { | |
322 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
323 | new id,powod[64]; | |
324 | if(sscanf(cmdtext,"ds",id,powod)) return SendClientMessage(playerid,COLOR_ADMIN,"Koristi: /dkick [ID] [Razlog]"); | |
325 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Nie Ma Takiego Gracza!"); | |
326 | ||
327 | new string[256]; | |
328 | format(string,sizeof(string),"Igrac %s (id: %d) je izbacen od strane Discret Admin! Razlog:%s.",PlayerName(id),id,powod); | |
329 | SendClientMessageToAll(COLOR_ADMIN,string); | |
330 | print(string); | |
331 | Kick(id); | |
332 | return 1; | |
333 | } | |
334 | CMD:dmute(playerid,cmdtext[]) | |
335 | { | |
336 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
337 | new id,czas; | |
338 | if(sscanf(cmdtext,"dd",id,czas)) return SendClientMessage(playerid,COLOR_ADMIN,"Koristi: /dmute [ID] [Period]"); | |
339 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
340 | Mute[id] = 1; | |
341 | new string[256]; | |
342 | format(string,sizeof(string),"Igrac %s (id: %d) je mutiran od strane Discret Admin %d minuta !.",PlayerName(id),id,czas); | |
343 | SendClientMessageToAll(COLOR_ADMIN,string); | |
344 | print(string); | |
345 | UnMutex = SetTimer("UnMute",czas*100000,0); | |
346 | return 1; | |
347 | } | |
348 | forward UnMute(playerid); | |
349 | public UnMute(playerid) | |
350 | { | |
351 | Mute[playerid] = 0; | |
352 | SendClientMessage(playerid,COLOR_YELLOW,"Sad mozes pisati!"); | |
353 | return 1; | |
354 | } | |
355 | CMD:dunmute(playerid,params[]) | |
356 | { | |
357 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
358 | new id = strval(params); | |
359 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,COLOR_YELLOW,"Koristi: /dunmute [ID]"); | |
360 | Mute[id] = 0; | |
361 | KillTimer(UnMutex); | |
362 | new string[124]; | |
363 | format(string,sizeof(string),"Igrac %s (id: %d) je odmutiran od strane Discret Admin!",PlayerName(id),id); | |
364 | SendClientMessageToAll(COLOR_ADMIN,string); | |
365 | return 1; | |
366 | } | |
367 | CMD:dwarn(playerid,cmdtext[]) | |
368 | { | |
369 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
370 | new id,powod[64]; | |
371 | if(sscanf(cmdtext,"ds",id,powod)) return SendClientMessage(playerid,COLOR_GREEN,"Koristi: /dwarn [ID] [Razlog]"); | |
372 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
373 | ||
374 | Warn[id]++; | |
375 | new x[124]; | |
376 | format(x,sizeof(x),"Igrac %s (id: %d) ce dobiti upozorenje (%d/2) od strane Discret Admina. Razlog:%s",PlayerName(id),id,Warn[id],powod); | |
377 | SendClientMessageToAll(COLOR_ADMIN,x); | |
378 | ||
379 | if(Warn[id] == 2) | |
380 | ||
381 | ||
382 | { | |
383 | new string[124]; | |
384 | format(string,sizeof(string),"Gracz %s (id: %d) je uklonje sa servera! Razlog:Ne primjenju je se na prepuruci uprave",PlayerName(id),id); | |
385 | SendClientMessageToAll(COLOR_ADMIN,string); | |
386 | print(string); | |
387 | Kick(id); | |
388 | return 1; | |
389 | ||
390 | ||
391 | } | |
392 | return 1; | |
393 | } | |
394 | CMD:dunwarn(playerid,params[]) | |
395 | { | |
396 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
397 | new id = strval(params); | |
398 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,COLOR_YELLOW,"Koristi: /dunwarn [ID]"); | |
399 | Warn[id] --; | |
400 | new string[256]; | |
401 | format(string,sizeof(string),"Discret Admin skida upozorenja (%d/2) igracu %s (id: %d)",Warn[id],PlayerName(playerid),playerid); | |
402 | SendClientMessageToAll(COLOR_ADMIN,string); | |
403 | return 1; | |
404 | } | |
405 | CMD:givemoney(playerid,cmdtext[]) | |
406 | { | |
407 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
408 | new id,kasa; | |
409 | if(sscanf(cmdtext,"dd",id,kasa)) return SendClientMessage(playerid,COLOR_ADMIN,"Koristi: /givemoney [ID] [Kolicina novca]"); | |
410 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
411 | ||
412 | GivePlayerMoney(id,kasa); | |
413 | new string[124]; | |
414 | format(string,sizeof(string),"Discret Admin vam daje:%d$ ",kasa); | |
415 | SendClientMessage(id,COLOR_GREEN,string); | |
416 | format(string,sizeof(string),"Dao si igracu %s (id: %d) %d$",PlayerName(id),id,kasa); | |
417 | SendClientMessage(playerid,COLOR_GREEN,string); | |
418 | return 1; | |
419 | } | |
420 | CMD:givemoneyall(playerid,params[]) | |
421 | { | |
422 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
423 | new kasa = strval(params); | |
424 | for(new a;a<GetMaxPlayers();a++) | |
425 | ||
426 | ||
427 | { | |
428 | GivePlayerMoney(a,kasa); | |
429 | ||
430 | ||
431 | } | |
432 | new string[124]; | |
433 | format(string,sizeof(string),"Discret Admin je dao %d$ !",kasa); | |
434 | SendClientMessageToAll(COLOR_GREEN,string); | |
435 | return 1; | |
436 | } | |
437 | CMD:dheal(playerid,params[]) | |
438 | { | |
439 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
440 | new id = strval(params); | |
441 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Koristi: /dheal [ID] "); | |
442 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
443 | SetPlayerHealth(id,100.0); | |
444 | new string[124]; | |
445 | format(string,sizeof(string),"Izlijecio si %s (id: %d)",PlayerName(id),id); | |
446 | SendClientMessage(playerid,COLOR_GREEN,string); | |
447 | SendClientMessage(id,COLOR_GREEN,"Discret Admin te je izlijecio !"); | |
448 | return 1; | |
449 | } | |
450 | CMD:darmor(playerid,params[]) | |
451 | { | |
452 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
453 | new id = strval(params); | |
454 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Koristi: /darmour [ID] "); | |
455 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
456 | SetPlayerArmour(id,100.0); | |
457 | new string[124]; | |
458 | format(string,sizeof(string),"Dao si igracu %s (id: %d) pancir!",PlayerName(id),id); | |
459 | SendClientMessage(playerid,COLOR_GREEN,string); | |
460 | SendClientMessage(id,COLOR_GREEN,"Discret Admin ti je dao pancir!"); | |
461 | return 1; | |
462 | } | |
463 | CMD:dexplode(playerid,params[]) | |
464 | { | |
465 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
466 | new id = strval(params); | |
467 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Koristi: /dexplode [ID]"); | |
468 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan !"); | |
469 | ||
470 | new Float:X,Float:Y,Float:Z; | |
471 | GetPlayerPos(id,X,Y,Z); | |
472 | CreateExplosion(X,Y,Z,2,50); | |
473 | return 1; | |
474 | } | |
475 | CMD:dtt(playerid,params[]) | |
476 | { | |
477 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
478 | new id = strval(params); | |
479 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Koristi: /dtt [ID]"); | |
480 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
481 | new Float:X,Float:Y,Float:Z; | |
482 | GetPlayerPos(id,X,Y,Z); | |
483 | SetPlayerPos(playerid,X,Y,Z); | |
484 | return 1; | |
485 | } | |
486 | CMD:dth(playerid,params[]) | |
487 | { | |
488 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
489 | new id = strval(params); | |
490 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Koristi: /dtt [ID]"); | |
491 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
492 | new Float:X,Float:Y,Float:Z; | |
493 | GetPlayerPos(playerid,X,Y,Z); | |
494 | SetPlayerPos(id,X,Y,Z); | |
495 | return 1; | |
496 | } | |
497 | CMD:dgivegun(playerid,cmdtext[]) | |
498 | { | |
499 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
500 | new id,bron,ammo; | |
501 | if(sscanf(cmdtext,"ddd",id,bron,ammo)) return SendClientMessage(playerid,COLOR_GREEN,"Koristi: /givegun [ID] [ID oruzija] [Kolicina metaka]"); | |
502 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
503 | GivePlayerWeapon(id,bron,ammo); | |
504 | new string[124]; | |
505 | format(string,sizeof(string),"Discret Admin ti je dao oruzije ID: %d i municije: %s",bron,ammo); | |
506 | SendClientMessage(id,COLOR_GREEN,string); | |
507 | format(string,sizeof(string),"Dao si igracu %s (id: %d) oruzije ID: %d i municije: %s",PlayerName(id),id,bron,ammo); | |
508 | SendClientMessage(playerid,COLOR_GREEN,string); | |
509 | return 1; | |
510 | } | |
511 | CMD:dgivegunall(playerid,cmdtext[]) | |
512 | { | |
513 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
514 | new bron,ammo; | |
515 | if(sscanf(cmdtext,"dd",bron,ammo)) return SendClientMessage(playerid,COLOR_GREEN,"Koristi: /givegunall [ID oruzija] [Kolicina metaka]"); | |
516 | ||
517 | for(new a;a<GetMaxPlayers();a++) | |
518 | ||
519 | ||
520 | { | |
521 | GivePlayerWeapon(a,bron,ammo); | |
522 | ||
523 | ||
524 | } | |
525 | new string[124]; | |
526 | format(string,sizeof(string),"Discret Admin je dao svim igracima oruzije ID: %d i municiju: %d",bron,ammo); | |
527 | SendClientMessageToAll(COLOR_GREEN,string); | |
528 | return 1; | |
529 | } | |
530 | CMD:dinfo(playerid,params[]) | |
531 | { | |
532 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
533 | new id = strval(params); | |
534 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,COLOR_GREEN,"Koristi: /dinfo [ID]"); | |
535 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
536 | new string[700]; | |
537 | format(string,sizeof(string),"Nick: %s (id: %d)",PlayerName(id),id); | |
538 | SendClientMessage(playerid,COLOR_GREEN,string); | |
539 | format(string,sizeof(string),"IP: %s",PlayerIP(id)); | |
540 | SendClientMessage(playerid,COLOR_GREEN,string); | |
541 | return 1; | |
542 | } | |
543 | CMD:dsethp(playerid,cmdtext[]) | |
544 | { | |
545 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
546 | new id,hp; | |
547 | if(sscanf(cmdtext,"dd",id,hp)) return SendClientMessage(playerid,-1,"Koristi: /dsethp [ID] [Kolicina HP-a]"); | |
548 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
549 | ||
550 | SetPlayerHealth(id,hp); | |
551 | new string[124]; | |
552 | format(string,sizeof(string),"Discret Admin ti je postavio HP na %d",hp); | |
553 | SendClientMessage(id,COLOR_ADMIN,string); | |
554 | format(string,sizeof(string),"Postavio si igracu %s (id: %d) HP na: %d",PlayerName(id),id,hp); | |
555 | SendClientMessage(playerid,COLOR_ADMIN,string); | |
556 | return 1; | |
557 | } | |
558 | CMD:dsay(playerid,cmdtext[]) | |
559 | { | |
560 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
561 | if(isnull(cmdtext)) return SCM(playerid,-1,"Koristi: /d [Tekst]"); | |
562 | new string[124]; | |
563 | format(string,sizeof(string),"Discret Admin: %s",cmdtext); | |
564 | SendClientMessageToAll(COLOR_ADMIN,string); | |
565 | return 1; | |
566 | } | |
567 | CMD:d(playerid,cmdtext[]) | |
568 | { | |
569 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
570 | if(isnull(cmdtext)) return SendClientMessage(playerid,-1,"Koristi: /d [Tekst]"); | |
571 | new string[124]; | |
572 | format(string,sizeof(string),"[Discret-Chat]%s (%d): %s",PlayerName(playerid),playerid,cmdtext); | |
573 | SendClientMessageToDiscret(COLOR_GREEN,string); | |
574 | return 1; | |
575 | } | |
576 | CMD:dsetarmor(playerid,cmdtext[]) | |
577 | { | |
578 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
579 | new id,hp; | |
580 | if(sscanf(cmdtext,"dd",id,hp)) return SendClientMessage(playerid,-1,"Koristi: /dsearmor [ID] [Kolicina pancira]"); | |
581 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
582 | ||
583 | SetPlayerArmour(id,hp); | |
584 | new string[124]; | |
585 | format(string,sizeof(string),"Discret Admin ti je postavio pancir na %d",hp); | |
586 | SendClientMessage(id,COLOR_ADMIN,string); | |
587 | format(string,sizeof(string),"Postavio si igracu %s (id: %d) kolicinu pancira na: %d",PlayerName(id),id,hp); | |
588 | SendClientMessage(playerid,COLOR_ADMIN,string); | |
589 | return 1; | |
590 | } | |
591 | CMD:dkillp(playerid,params[]) | |
592 | { | |
593 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
594 | new id = strval(params); | |
595 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
596 | if(id < 0 || id > GetMaxPlayers()) return SCM(playerid,-1,"Koristi: /dkillp [ID]"); | |
597 | SetPlayerHealth(id,0.0); | |
598 | new string[124]; | |
599 | format(string,sizeof(string),"Ubio si igraca: %s (id: %d)",PlayerName(id),id); | |
600 | SendClientMessage(playerid,COLOR_GREEN,string); | |
601 | SendClientMessage(id,COLOR_GREEN,"Discret Admin te je ubio !"); | |
602 | return 1; | |
603 | } | |
604 | CMD:dann(playerid, cmdtext[]) | |
605 | { | |
606 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
607 | if(isnull(cmdtext)) return SendClientMessage(playerid,-1,"Koristi: /ann [Tekst]"); | |
608 | ||
609 | TextDrawSetString(Ann, cmdtext); | |
610 | TextDrawShowForAll(Ann); | |
611 | SetTimer("AnnOFF", 5000, false); | |
612 | return 1; | |
613 | } | |
614 | forward AnnOFF(); | |
615 | public AnnOFF() | |
616 | { | |
617 | TextDrawHideForAll(Ann); | |
618 | return 1; | |
619 | } | |
620 | CMD:dhealall(playerid,params[]) | |
621 | { | |
622 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
623 | for(new a;a<GetMaxPlayers();a++) | |
624 | ||
625 | ||
626 | { | |
627 | SetPlayerHealth(a,100.0); | |
628 | ||
629 | ||
630 | } | |
631 | SendClientMessageToAll(COLOR_GREEN,"Discret Admin je izlijecio sve !"); | |
632 | return 1; | |
633 | } | |
634 | CMD:darmorall(playerid,params[]) | |
635 | { | |
636 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
637 | for(new a;a<GetMaxPlayers();a++) | |
638 | ||
639 | ||
640 | { | |
641 | SetPlayerArmour(a,100.0); | |
642 | ||
643 | ||
644 | } | |
645 | SendClientMessageToAll(COLOR_GREEN,"Discret Admin je dao svima pancir!"); | |
646 | return 1; | |
647 | } | |
648 | CMD:dsethpall(playerid,params[]) | |
649 | { | |
650 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
651 | new hp = strval(params); | |
652 | for(new a;a<GetMaxPlayers();a++) | |
653 | ||
654 | ||
655 | { | |
656 | SetPlayerHealth(a,hp); | |
657 | ||
658 | ||
659 | } | |
660 | new string[124]; | |
661 | format(string,sizeof(string),"Discret Admin je postavio svim igracima HP na: %d",hp); | |
662 | SendClientMessageToAll(COLOR_GREEN,string); | |
663 | return 1; | |
664 | } | |
665 | CMD:dsetarmorall(playerid,params[]) | |
666 | { | |
667 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
668 | new hp = strval(params); | |
669 | for(new a;a<GetMaxPlayers();a++) | |
670 | ||
671 | ||
672 | { | |
673 | SetPlayerArmour(a,hp); | |
674 | ||
675 | ||
676 | } | |
677 | new string[124]; | |
678 | format(string,sizeof(string),"Discret Admin je postavio svima kolicinu pancira na: %d",hp); | |
679 | SendClientMessageToAll(COLOR_GREEN,string); | |
680 | return 1; | |
681 | } | |
682 | CMD:dhpadd(playerid,params[]) | |
683 | { | |
684 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret ADmin !"); | |
685 | new id = strval(params); | |
686 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Koristi: /dhpadd [ID] "); | |
687 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
688 | ||
689 | new Float:HP; | |
690 | GetPlayerHealth(id,HP); | |
691 | SetPlayerHealth(id,HP+10); | |
692 | ||
693 | new string[124]; | |
694 | format(string,sizeof(string),"Dapo si igracu: %s (id: %d) 10 HP",PlayerName(id),id); | |
695 | SendClientMessage(playerid,COLOR_GREEN,string); | |
696 | SendClientMessage(id,COLOR_GREEN,"Discret Admin ti je dao +10 HP"); | |
697 | return 1; | |
698 | } | |
699 | CMD:dslap(playerid,params[]) | |
700 | { | |
701 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin !"); | |
702 | new id = strval(params); | |
703 | if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Koristi: /dslap [ID] "); | |
704 | if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Igrac nije konektovan!"); | |
705 | ||
706 | new Float:HP; | |
707 | GetPlayerHealth(id,HP); | |
708 | SetPlayerHealth(id,HP-10); | |
709 | ||
710 | new string[124]; | |
711 | format(string,sizeof(string),"Dajes/Skidas igracu: %s (id: %d) 10 HP",PlayerName(id),id); | |
712 | SendClientMessage(playerid,COLOR_GREEN,string); | |
713 | SendClientMessage(id,COLOR_GREEN,"Discret Admin ti je Dao/Skinuo -10 HP !"); | |
714 | return 1; | |
715 | } | |
716 | CMD:dadmins(playerid,params[]) | |
717 | { | |
718 | if(!Discret[playerid] && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
719 | new Name[124]; | |
720 | new string[124]; | |
721 | GetPlayerName(playerid,Name,124); | |
722 | for(new x=0;x<GetMaxPlayers();x++) | |
723 | ||
724 | { | |
725 | if(IsPlayerConnected(x) && Discret[x]) | |
726 | ||
727 | ||
728 | { | |
729 | format(string,sizeof(string),"%s\n",Name); | |
730 | ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Konektovani Discret Admin:",string,"OK","OK"); | |
731 | x++; | |
732 | ||
733 | } | |
734 | ||
735 | ||
736 | } | |
737 | return 1; | |
738 | } | |
739 | ||
740 | CMD:killall(playerid,params[]) | |
741 | { | |
742 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
743 | for(new a;a<GetMaxPlayers();a++) | |
744 | ||
745 | { | |
746 | SetPlayerHealth(a,0.0); | |
747 | ||
748 | } | |
749 | SendClientMessageToAll(COLOR_GREEN,"Discret Admin je ubio sve igrace !"); | |
750 | return 1; | |
751 | } | |
752 | CMD:dinvisible(playerid,params[]) | |
753 | { | |
754 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
755 | SetPlayerColor(playerid, 0xFFFFFF00); | |
756 | SCM(playerid,-1,"Postao si ne vidljiv na mapi..."); | |
757 | return 1; | |
758 | } | |
759 | CMD:dvisible(playerid,params[]) | |
760 | { | |
761 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
762 | SetPlayerColor(playerid, COLOR_GREEN); | |
763 | SCM(playerid,-1,"Postao si vidljiv na mapi..."); | |
764 | return 1; | |
765 | } | |
766 | CMD:dcz(playerid,params[]) | |
767 | { | |
768 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
769 | for(new a;a<32;a++) | |
770 | ||
771 | { | |
772 | SendClientMessageToAll(COLOR_WHITE," "); | |
773 | ||
774 | } | |
775 | return 1; | |
776 | } | |
777 | CMD:dfix(playerid,params[]) | |
778 | { | |
779 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
780 | if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1,"Nisi u vozilu!"); | |
781 | new car = GetPlayerVehicleID(playerid); | |
782 | RepairVehicle(car); | |
783 | SCM(playerid,-1,"Vase vozilo je popravljeno !"); | |
784 | return 1; | |
785 | } | |
786 | CMD:dfixall(playerid,params[]) | |
787 | { | |
788 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
789 | for(new x;x<GetMaxPlayers();x++) | |
790 | ||
791 | { | |
792 | new car = GetPlayerVehicleID(x); | |
793 | RepairVehicle(car); | |
794 | ||
795 | } | |
796 | SendClientMessageToAll(COLOR_GREEN,"Discret Admin je popravio svima vozilo !"); | |
797 | return 1; | |
798 | } | |
799 | CMD:dgod(playerid,params[]) | |
800 | { | |
801 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
802 | new id = strval(params); | |
803 | if(id < 0 || id > GetMaxPlayers()) return SCM(playerid,-1,"Koristi: /god [ID]"); | |
804 | if(!IsPlayerConnected(id)) return SCM(playerid,-1,"Igrac nije konektovan !"); | |
805 | SetPlayerHealth(id,999999); | |
806 | new string[124]; | |
807 | format(string,sizeof(string),"Dao si igracu %s (id: %d) beskonacno HP-a!",PlayerName(id),id); | |
808 | SCM(playerid,COLOR_GREEN,string); | |
809 | SCM(id,COLOR_GREEN,"Discret Admin ti je dao beskonacno HP-a!"); | |
810 | return 1; | |
811 | } | |
812 | CMD:dgodall(playerid,params[]) | |
813 | { | |
814 | if(!Discret[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"Discret Admin!"); | |
815 | for(new x;x<GetMaxPlayers();x++) | |
816 | ||
817 | { | |
818 | SetPlayerHealth(x,9999999); | |
819 | ||
820 | } | |
821 | SendClientMessageToAll(COLOR_GREEN,"Discret Admin je dao svim igracima beskonacno HP-a!"); | |
822 | return 1; | |
823 | } | |
824 | forward Cosie(); | |
825 | public Cosie() | |
826 | { | |
827 | if(!DOF_FileExists("xx.ini")) | |
828 | ||
829 | { | |
830 | DOF_CreateFile("xx.ini"); | |
831 | DOF_SetString("xx.ini","SCM","Na serveru je instaliran Script/System Discret Admin By GTA!"); | |
832 | print("Napisano"); | |
833 | ||
834 | } | |
835 | else | |
836 | ||
837 | { | |
838 | new xz[124]; | |
839 | strmid(xz, DOF_GetString("xx.ini", "SCM"), 0, 34, 34); | |
840 | SendClientMessageToAll(COLOR_GREEN,xz); | |
841 | ||
842 | } | |
843 | return 1; | |
844 | } |