· 6 years ago · May 01, 2019, 07:52 PM
1#include <a_samp>
2#include <a_mysql>
3#include <streamer>
4#include <zcmd>
5#include <sscanf2>
6#include <foreach>
7
8#define WORLD_LOGIN 5
9#define FIX_CAR_COST -100
10
11//CZAT GLOBLANY
12
13#define COLOR_RED 0xEC0029FF
14#define COLOR_LIGHT_GREY 0xC0C0C0FF
15#define COLOR_BLACK 0x000000FF
16#define COLOR_PINKY 0xFF80FFFF
17#define COLOR_YELLOW 0xFFFF00FF
18#define COLOR_ORANGE 0xFF8000FF
19#define COLOR_WHITE 0xFFFFFFFF
20//KOMENDA DO
21
22#define COLOR_PURPLE_DARK 0x8080C0FF
23#define COLOR_MORSKI 0x408080FF
24main(){}
25
26native WP_Hash(buffer[], len, const str[]);
27//Forwardy
28forward bool:IsStrValid(const string[]);
29forward RspTimer1();
30forward RspTimer2();
31//Ustawienia
32#define MONEY_MONEY_START 6500
33#define PRESSED(%O) \
34//Dialogi
35#define REGISTER1_DIALOG 0
36#define LOGIN_DIALOG 1
37#define REGISTER2_DIALOG 2
38#define REGISTER3_DIALOG 3
39
40//Definicje
41#define SKRYPT_NAME "Najlepszy Polski Serwer"
42#define SKRYPT_VERSJA "V1.0.0"
43#define INFO_STRING "{008080}[INFO]{C0C0C0}: "
44#define ERROR_STRING "{FF0000}[BÅÄ„D]{800000}: "
45
46#define MAX_ENTRACES 100
47
48#define GENDER_MALE 0
49#define GENDER_FEMALE 1
50
51new Text:Belt[6]; // paski
52new Text:Textura[2]; // tekstury
53new Text:UrlWeb; // TD z adresem strony
54new Text:Date; // TD z data
55new Text:Online; // TD z graczami online
56new PlayerText:Belt_Player[5][MAX_PLAYERS];
57
58new z1, z2, z3; // rok, miesiąc, dzień
59new td_string[50];
60
61
62#define NAZWA_SERWERA "~y~NPS~w~.pl"
63
64#define TIME_ONLINE 0
65#define PLAYER_ID 1
66#define PLAYER_NAME 2
67#define PLAYER_MONEY 3
68#define PLAYER_SCORE 4
69
70#define TIMER_MIN 0.5 // czas odświeżania (w minutach)
71
72
73
74
75
76
77
78forward Refresh(playerid);
79
80#define MAX_BRAMY 100
81new brama[MAX_BRAMY];
82new bool:OtwartaCzyZamknieta[MAX_BRAMY];
83
84 //textdrawy
85new Text:SkinSelector_Title;
86new Text:SkinSelector_Right;
87new Text:SkinSelector_Left;
88new Text:SkinSelector_Accept;
89new Text:czas;
90new Text:data;
91new Text:Tday;
92new Text:skinnr;
93new Text:loginscreen;
94new Text:loginbutton;
95new Text:registerbutton;
96
97//eNUMY
98enum DataPlayer
99{
100 bool:LoggedIn,
101 bool:ShowMouse,
102 bool:IsFreezed,
103 bool:FirstSpawn,
104 Cache:Cache_ID,
105 UID,
106 Password[129],
107 Age,
108 Lvl,
109 Gender,
110 IDSkin,
111 Money,
112 AdminLV,
113 Float:LastPos[4],
114 Linterior,
115 LVW,
116 Float:HP,
117 Float:Armour,
118
119 //Wybierałka
120 SelectedIDSkin
121};
122
123new entranceindex;
124enum EntranceData
125{
126 bool:e_freeze,
127 Float:e_posx,
128 Float:e_posy,
129 Float:e_posz,
130 Float:e_rotation,
131 e_interior,
132 e_vw,
133 e_conid
134};
135new Entrance[MAX_ENTRACES][EntranceData];
136
137new Player[MAX_PLAYERS][DataPlayer];
138new MySQL:SQL_ID;
139 //Zmienne Globalne
140new Skins_Male[][] = {20001, 20002, 20003, 20004, 20009, 20010, 20011, 20012, 20013, 20014, 20015, 20017, 20018, 20019, 20022, 0, 1, 2, 3, 4, 5, 6, 7, 8, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 57, 58, 59, 60, 61, 62, 66, 67, 68, 70, 71, 72, 73, 74, 78, 79, 80, 81, 82, 83, 84, 86, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 132, 133, 134, 135, 136, 137, 142, 143, 144, 146, 147, 149, 153, 154, 155, 156, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 170, 171, 173, 174, 175, 176, 177, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 200, 202, 203, 204, 206, 208, 209, 210, 212, 213, 220, 221, 222, 223, 227, 228, 229, 230, 234, 235, 236, 239, 240, 241, 242, 247, 248, 249, 250, 252, 253, 254, 255, 258, 259, 260, 261, 262, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 299, 300, 301, 302, 303, 304, 305, 310, 311}; //Facety
141new Skins_Female[][] = { 20005, 20006, 20007,20008, 20016, 20020, 20021, 20023, 20024, 20025, 10, 11, 12, 13, 31, 38, 39, 40, 41, 53, 54, 55, 56, 63, 64, 65,69,75, 76, 77, 85, 87, 88, 89, 90, 91, 92, 93, 129, 130, 131,138, 139, 140, 141, 145, 148, 150, 151, 152, 157, 169, 172, 178, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 201, 205, 207, 211, 214, 215, 216, 217, 218, 219, 224, 225, 226, 231, 232, 233, 237, 238, 243, 244, 245, 246, 251, 256, 257, 263, 298, 306, 307, 308, 309}; //Babsztyle
142
143new day, month, year;
144new Hour, Minute;
145
146new VehicleName[212][] =
147{
148 "Landstalker", "Bravura", "Buffalo", "Linerunner", "Pereniel", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
149 "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat", "Mr Whoopee", "BF Injection",
150 "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
151 "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
152 "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider",
153 "Glendale", "Oceanic", "Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR3 50", "Walton", "Regina",
154 "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood",
155 "Jetmax", "Hotring", "Sandking", "Blista Compact", "Police Maverick", "Boxville", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B",
156 "Bloodring Banger", "Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropdust", "Stunt", "Tanker", "RoadTrain",
157 "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune", "Cadrona", "FBI Truck",
158 "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent", "Bullet", "Clover",
159 "Sadler", "Firetruck", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite", "Windsor", "Monster A",
160 "Monster B", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight", "Trailer",
161 "Kart", "Mower", "Duneride", "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "Newsvan", "Tug", "Trailer A", "Emperor",
162 "Wayfarer", "Euros", "Hotdog", "Club", "Trailer B", "Trailer C", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car (LSPD)", "Police Car (SFPD)",
163 "Police Car (LVPD)", "Police Ranger", "Picador", "S.W.A.T. Van", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage Trailer A", "Luggage Trailer B",
164 "Stair Trailer", "Boxville", "Farm Plow", "Utility Trailer"
165};
166public OnPlayerCommandPerformed(playerid, cmdtext[], success)
167{
168 for(new i; i < sizeof VehicleName; i++)
169 {
170 new command[12];
171 format(command, sizeof command, "/%s", VehicleName[i]);
172 if(strcmp(cmdtext, command, true) == 0)
173 {
174 if(IsPlayerInAnyVehicle(playerid))
175 {
176 new vehid = GetPlayerVehicleID(playerid);
177 DestroyVehicle(vehid);
178
179 new modelid = GetPlayerVehicleIDFromString(VehicleName[i]);
180
181 if(modelid == 425 || modelid == 520 || modelid == 432 || modelid == 601)
182 {
183 if(IsPlayerAdmin(playerid))
184 {
185 new string[16];
186 format(string, sizeof string, "~g~~h~%s", VehicleName[i]);
187 GameTextForPlayer(playerid, string, -1, 1);
188
189 new Float:coords[3];
190 GetPlayerPos(playerid, coords[0], coords[1], coords[2]);
191 CreateVehiclePlayer(playerid, modelid, coords[0], coords[1], coords[2]);
192 }
193 else SendClientMessage(playerid, -1, ERROR_STRING"Chciałoby się Co ??");
194 }
195 else
196 {
197 new string[16];
198 format(string, sizeof string, "~g~~h~%s", VehicleName[i]);
199 GameTextForPlayer(playerid, string, -1, 1);
200
201 new Float:coords[3];
202 GetPlayerPos(playerid, coords[0], coords[1], coords[2]);
203 CreateVehiclePlayer(playerid, modelid, coords[0], coords[1], coords[2]);
204 }
205 }
206 else
207 {
208 new modelid = GetPlayerVehicleIDFromString(VehicleName[i]);
209
210 if(modelid == 425 || modelid == 520 || modelid == 432 || modelid == 601)
211 {
212 if(IsPlayerAdmin(playerid))
213 {
214 new string[16];
215 format(string, sizeof string, "~g~~h~%s", VehicleName[i]);
216 GameTextForPlayer(playerid, string, -1, 1);
217
218 new Float:coords[3];
219 GetPlayerPos(playerid, coords[0], coords[1], coords[2]);
220 CreateVehiclePlayer(playerid, modelid, coords[0], coords[1], coords[2]);
221 }
222 else SendClientMessage(playerid, -1, ERROR_STRING"Chciałoby się Co ??");
223 }
224 else
225 {
226 new string[16];
227 format(string, sizeof string, "~g~~h~%s", VehicleName[i]);
228 GameTextForPlayer(playerid, string, -1, 1);
229
230 new Float:coords[3];
231 GetPlayerPos(playerid, coords[0], coords[1], coords[2]);
232 CreateVehiclePlayer(playerid, modelid, coords[0], coords[1] + 10, coords[2]);
233 }
234 }
235 break;
236 }
237 }
238 return 1;
239}
240
241public OnVehicleDeath(vehicleid, killerid)
242{
243 DestroyVehicle(vehicleid);
244 return 1;
245}
246
247public Refresh(playerid)
248{
249 return 1;
250}
251
252public OnGameModeInit()
253{
254 UsePlayerPedAnims();
255 DestroyAllDynamicObjects();
256 printf("Gamemode %s %s ® by Kreto Wystartował", SKRYPT_NAME, SKRYPT_VERSJA);
257 AddPlayerClass(0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
258 if(MySQL_Init())
259 {
260 //Wczytywanie
261 MySQL_SetUpTables();
262 CreateGlobalTD();
263 ZaladujDate();
264 ZaladujCzas();
265 new days, months, years;
266 GetWeekDay(days, months, years);
267 //Timer
268 SetTimer("SecondUpdate", 1000, true);
269
270 SetTimer("RspTimer1", 60000, false); //60000 milisekund to 1 minuta.
271 SetTimer("RspTimer2", 3600000, false); //3600000 milisekund to 1 godzina.
272
273 //Ustawienia
274 DisableInteriorEnterExits();
275 EnableStuntBonusForAll(false);
276 SetGameModeText("All-In-One");
277
278 //mapicon
279
280 CreateDynamicMapIcon(2324.3040, -1135.8479, 1051.3047, 37, 0, 0, 0, -1, 500, MAPICON_GLOBAL, -1, 0);
281
282
283 //Wejścia/Wyjścia
284 ConnectEntrances(
285 CreateEntrance("UrzÄ…d Miasta w Los Santos", 1219.2979, -1812.3729, 16.5938, 177.8039, 0, 0, -1, 62, false),
286 CreateEntrance("Urząd Miasta w Los Santos - Wyjście", 384.80864,173.804992,1008.382812, 90.0, 3, 1, -1, -1, false));
287
288 ConnectEntrances(
289 CreateEntrance("UrzÄ…d Miasta w San Fierro", -2765.3870, 375.6902, 6.3359, 269.3221, 0, 0, -1, 61, false),
290 CreateEntrance("Urząd Miasta w San Fierro - Wyjście", 384.80864,173.804992,1008.382812, 90.0, 3, 2, -1, -1, false));
291
292 ConnectEntrances(
293 CreateEntrance("UrzÄ…d Miasta w Las Venturas", 2633.6101, 1823.1554, 11.0161, 80.6707, 0, 0,-1, 58, false),
294 CreateEntrance("Urząd Miasta w Las Venturas - Wyjście", 384.80864,173.804992,1008.382812, 90.0, 3, 3, -1, -1, false));
295
296 printf("Gamemode %s %s ® by Kreto działa\n", SKRYPT_NAME, SKRYPT_VERSJA);
297 }
298 else
299 {
300 print("Brak połączenia z bazą danych.");
301 }
302 StworzBrame();
303 return 1;
304
305}
306
307
308public RspTimer1()
309{
310new playerid;
311Respekt(playerid, 1);//Funkcja dajÄ…ca graczowi 1 pkt. respektu co minutÄ™.
312}
313
314public RspTimer2()
315{
316new playerid;
317Respekt(playerid, 100);//Funkcja dajÄ…ca graczowi 100 pkt. respektu co godzinÄ™.
318}
319
320public OnPlayerFinishedDownloading(playerid, virtualworld)
321{
322 if(GetPlayerVirtualWorld(playerid) == WORLD_LOGIN)
323 {
324 TextDrawShowForPlayer(playerid, loginscreen);
325 TextDrawShowForPlayer(playerid, loginbutton);
326 TextDrawShowForPlayer(playerid, registerbutton);
327 ClearPlayerChat(playerid);
328 SetSpawnInfo(playerid, NO_TEAM, 0, 1248.2993,-1563.6338,12.6017, 186.4331, 0, 0, 0, 0, 0, 0);
329 }
330 return 1;
331}
332
333public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
334{
335 if(newkeys & KEY_SECONDARY_ATTACK)
336 {
337 if(!IsPlayerInAnyVehicle(playerid))
338 {
339 if(Player[playerid][IsFreezed] == false)
340 {
341 new p_vw = GetPlayerVirtualWorld(playerid);
342 new p_int = GetPlayerInterior(playerid);
343 for(new i; i < entranceindex; i++)
344 {
345 if(IsPlayerInRangeOfPoint(playerid, 1.0, Entrance[i][e_posx],Entrance[i][e_posy],Entrance[i][e_posz]) && Entrance[i][e_interior] == p_int && Entrance[i][e_vw] == p_vw)
346 {
347 new conid = Entrance[i][e_conid];
348 SetPlayerPos(playerid, Entrance[conid][e_posx],Entrance[conid][e_posy], Entrance[conid][e_posz]);
349 SetPlayerFacingAngle(playerid, Entrance[conid][e_rotation]);
350 SetPlayerInterior(playerid, Entrance[conid][e_interior]);
351 SetPlayerVirtualWorld(playerid, Entrance[conid][e_vw]);
352 SetCameraBehindPlayer(playerid);
353 if(Entrance[conid][e_freeze])
354 FreezePlayer(playerid, 3000, "Wczytywanie");
355 break;
356 }
357 }
358 }
359 }
360
361 }
362 if(newkeys & KEY_YES)
363 {
364 for(new i; i < MAX_BRAMY; i++)
365 {
366 new Float:pos[3];
367 GetDynamicObjectPos(i, pos[0], pos[1], pos[2]);
368
369 if(IsPlayerInRangeOfPoint(playerid, 15.0, pos[0], pos[1], pos[2]))
370 {
371 if(!IsDynamicObjectMoving(i))
372 {
373 if(OtwartaCzyZamknieta[i] == true)
374 {
375 MoveDynamicObject(i, pos[0], pos[1], pos[2]+8.0, 6.0, -7.8, 2.9, 24.7);
376 GameTextForPlayer(playerid, "~y~brama ~w~closed", 3000, 6);
377 OtwartaCzyZamknieta[i] = false;
378 }
379 else
380 {
381 MoveDynamicObject(i, pos[0], pos[1], pos[2]-8.0, 6.0, -27.8, 2.9, 24.7);
382 GameTextForPlayer(playerid, "~p~brama ~g~open", 3000, 6);
383 OtwartaCzyZamknieta[i] = true;
384 }
385
386 }
387 break;
388 }
389 }
390 }
391 return 1;
392}
393
394
395
396public OnPlayerText(playerid, text[])
397{
398 new message[258];
399 format(message, sizeof message, "%s [%i] {FFFF00}mówi: {FFFFFF}%s", PlayerName(playerid), playerid, text);
400 SendClientMessageInRange(playerid, COLOR_ORANGE, 1550.0, message);
401 return 0;
402}
403
404public OnGameModeExit()
405{
406 mysql_close(SQL_ID);
407 UsunBramy();
408 return 1;
409}
410
411
412public OnPlayerDeath(playerid, killerid, reason)
413{
414 GameTextForPlayer( playerid, " Nie Zyjesz !! ",5000,3);
415 SendClientMessage(playerid, -1, INFO_STRING"ZGINÄ„ÅEÅš");
416 SendDeathMessageToPlayer(playerid, killerid, playerid, reason);
417 GameTextForPlayer( killerid, " Ty zwyrolu !! ",5000,3);
418 printf("[[debug] Player %d zabił gracza %d reason id %d ",playerid, killerid, reason );
419
420 if(killerid == INVALID_PLAYER_ID) //Sprawdzenie, czy gracz popełnił samobójstwo.
421 {
422 SendDeathMessage(INVALID_PLAYER_ID, playerid, reason);
423 }
424 else
425 {
426 SendDeathMessage(killerid, playerid, reason);
427 }
428
429 return 1;
430}
431
432public OnPlayerRequestClass(playerid, classid)
433{
434 SpawnPlayer(playerid);
435 return 1;
436}
437
438public OnPlayerConnect(playerid)
439{
440 SendDeathMessage(INVALID_PLAYER_ID,playerid, 200);
441 SetPlayerVirtualWorld(playerid, WORLD_LOGIN);
442 SetPVarInt(playerid, "oTime", gettime()); // zapisujemy czas uniksowy
443 /* TWORZENIE TD GRACZA */
444 Belt_Player[TIME_ONLINE][playerid] = CreatePlayerTextDraw(playerid, 307.000000, 419.000000, "00~y~h ~w~00~y~min");
445 PlayerTextDrawBackgroundColor(playerid, Belt_Player[TIME_ONLINE][playerid], 255);
446 PlayerTextDrawFont(playerid, Belt_Player[TIME_ONLINE][playerid], 1);
447 PlayerTextDrawLetterSize(playerid, Belt_Player[TIME_ONLINE][playerid], 0.209999, 1.000000);
448 PlayerTextDrawColor(playerid, Belt_Player[TIME_ONLINE][playerid], -1);
449 PlayerTextDrawSetOutline(playerid, Belt_Player[TIME_ONLINE][playerid], 0);
450 PlayerTextDrawSetProportional(playerid, Belt_Player[TIME_ONLINE][playerid], 1);
451 PlayerTextDrawSetShadow(playerid, Belt_Player[TIME_ONLINE][playerid], 1);
452
453 Belt_Player[PLAYER_ID][playerid] = CreatePlayerTextDraw(playerid, 312.000000, 436.000000, "ID: ~y~0");
454 PlayerTextDrawBackgroundColor(playerid, Belt_Player[PLAYER_ID][playerid], 255);
455 PlayerTextDrawFont(playerid, Belt_Player[PLAYER_ID][playerid], 1);
456 PlayerTextDrawLetterSize(playerid, Belt_Player[PLAYER_ID][playerid], 0.240000, 0.899999);
457 PlayerTextDrawColor(playerid, Belt_Player[PLAYER_ID][playerid], -1);
458 PlayerTextDrawSetOutline(playerid, Belt_Player[PLAYER_ID][playerid], 0);
459 PlayerTextDrawSetProportional(playerid, Belt_Player[PLAYER_ID][playerid], 1);
460 PlayerTextDrawSetShadow(playerid, Belt_Player[PLAYER_ID][playerid], 1);
461
462 Belt_Player[PLAYER_NAME][playerid] = CreatePlayerTextDraw(playerid, 367.000000, 436.000000, "Nick: ---");
463 PlayerTextDrawBackgroundColor(playerid, Belt_Player[PLAYER_NAME][playerid], 255);
464 PlayerTextDrawFont(playerid, Belt_Player[PLAYER_NAME][playerid], 1);
465 PlayerTextDrawLetterSize(playerid, Belt_Player[PLAYER_NAME][playerid], 0.240000, 0.899999);
466 PlayerTextDrawColor(playerid, Belt_Player[PLAYER_NAME][playerid], -1);
467 PlayerTextDrawSetOutline(playerid, Belt_Player[PLAYER_NAME][playerid], 0);
468 PlayerTextDrawSetProportional(playerid, Belt_Player[PLAYER_NAME][playerid], 1);
469 PlayerTextDrawSetShadow(playerid, Belt_Player[PLAYER_NAME][playerid], 1);
470
471 Belt_Player[PLAYER_MONEY][playerid] = CreatePlayerTextDraw(playerid, 211.000000, 436.000000, "Pieniedzy: ~y~0");
472 PlayerTextDrawBackgroundColor(playerid, Belt_Player[PLAYER_MONEY][playerid], 255);
473 PlayerTextDrawFont(playerid, Belt_Player[PLAYER_MONEY][playerid], 1);
474 PlayerTextDrawLetterSize(playerid, Belt_Player[PLAYER_MONEY][playerid], 0.240000, 0.899999);
475 PlayerTextDrawColor(playerid, Belt_Player[PLAYER_MONEY][playerid], -1);
476 PlayerTextDrawSetOutline(playerid, Belt_Player[PLAYER_MONEY][playerid], 0);
477 PlayerTextDrawSetProportional(playerid, Belt_Player[PLAYER_MONEY][playerid], 1);
478 PlayerTextDrawSetShadow(playerid, Belt_Player[PLAYER_MONEY][playerid], 1);
479
480 Belt_Player[PLAYER_SCORE][playerid] = CreatePlayerTextDraw(playerid, 432.000000, 436.000000, "Respekt: ~y~0");
481 PlayerTextDrawBackgroundColor(playerid, Belt_Player[PLAYER_SCORE][playerid], 255);
482 PlayerTextDrawFont(playerid, Belt_Player[PLAYER_SCORE][playerid], 1);
483 PlayerTextDrawLetterSize(playerid, Belt_Player[PLAYER_SCORE][playerid], 0.240000, 0.899999);
484 PlayerTextDrawColor(playerid, Belt_Player[PLAYER_SCORE][playerid], -1);
485 PlayerTextDrawSetOutline(playerid, Belt_Player[PLAYER_SCORE][playerid], 0);
486 PlayerTextDrawSetProportional(playerid, Belt_Player[PLAYER_SCORE][playerid], 1);
487 PlayerTextDrawSetShadow(playerid, Belt_Player[PLAYER_SCORE][playerid], 1);
488 /* KONIEC TWORZENIE TD GRACZA */
489
490 /* WYSWIETLANIE TD */
491 TextDrawShowForPlayer(playerid, Date);
492 TextDrawShowForPlayer(playerid, Online);
493 TextDrawShowForPlayer(playerid, UrlWeb);
494 TextDrawShowForPlayer(playerid, Textura[0]);
495 TextDrawShowForPlayer(playerid, Textura[1]);
496 TextDrawShowForPlayer(playerid, Belt[0]);
497 TextDrawShowForPlayer(playerid, Belt[1]);
498 TextDrawShowForPlayer(playerid, Belt[2]);
499 TextDrawShowForPlayer(playerid, Belt[3]);
500 TextDrawShowForPlayer(playerid, Belt[4]);
501 TextDrawShowForPlayer(playerid, Belt[5]);
502 PlayerTextDrawShow(playerid, Belt_Player[TIME_ONLINE][playerid]);
503 PlayerTextDrawShow(playerid, Belt_Player[PLAYER_ID][playerid]);
504 PlayerTextDrawShow(playerid, Belt_Player[PLAYER_NAME][playerid]);
505 PlayerTextDrawShow(playerid, Belt_Player[PLAYER_MONEY][playerid]);
506 PlayerTextDrawShow(playerid, Belt_Player[PLAYER_SCORE][playerid]);
507 /* KONIEC WYSWIETLANIA TD */
508
509 /* FORMATOWANIE NICKU, ID GRACZA i DATY*/
510 new name[MAX_PLAYER_NAME];
511 GetPlayerName(playerid, name, MAX_PLAYER_NAME);
512 strins(name,"Nick: ~y~",0);
513 PlayerTextDrawSetString(playerid, Belt_Player[PLAYER_NAME][playerid], name);
514
515 format(td_string, sizeof(td_string), "ID: ~y~%d",playerid);
516 PlayerTextDrawSetString(playerid, Belt_Player[PLAYER_ID][playerid], td_string);
517
518 getdate(z1, z2, z3);
519 format(td_string, sizeof(td_string), "~y~%02d~w~/%02d/%d~r~r", z3, z2, z1);
520 TextDrawSetString(Date, td_string);
521 z1 = 0, z2 = 0, z3 = 0;
522 return 1;
523}
524
525public OnPlayerDisconnect(playerid, reason)
526{
527 SendDeathMessage(INVALID_PLAYER_ID,playerid,201);
528 new query[258];
529 if(Player[playerid][LoggedIn])
530 {
531 SaveAccount(playerid);
532 mysql_format(SQL_ID, query, sizeof query, "UPDATE players_accounts SET lastonline = NOW() WHERE uid = %i", Player[playerid][UID]);
533 mysql_tquery(SQL_ID, query);
534 }
535 ResetPlayerData(playerid);
536 TextDrawHideForPlayer(playerid,Date);
537 TextDrawHideForPlayer(playerid,UrlWeb);
538 TextDrawHideForPlayer(playerid,Textura[0]);
539 TextDrawHideForPlayer(playerid,Textura[1]);
540 TextDrawHideForPlayer(playerid,Belt[0]);
541 TextDrawHideForPlayer(playerid,Belt[1]);
542 TextDrawHideForPlayer(playerid,Belt[2]);
543 TextDrawHideForPlayer(playerid,Belt[3]);
544 TextDrawHideForPlayer(playerid,Belt[4]);
545 TextDrawHideForPlayer(playerid,Belt[5]);
546 return 1;
547}
548
549public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
550{
551 switch(dialogid)
552 {
553 case LOGIN_DIALOG: //Login playersa
554 {
555 if(response)
556 {
557 if(strlen(inputtext) && IsStrValid(inputtext))
558 {
559 new buff[129], query[258];
560 WP_Hash(buff, 129, inputtext);
561 if(strcmp(Player[playerid][Password], buff, true) == 0)
562 {
563 // Hasło poprawne
564 AssignPlayerData(playerid); // odczyt z bazy danych
565 Player[playerid][LoggedIn] = true;
566 Player[playerid][FirstSpawn] = true;
567 ResetPlayerMoney(playerid);
568 GivePlayerMoney(playerid, Player[playerid][Money]);
569 SetPlayerScore(playerid, Player[playerid][Lvl]);
570 SetSpawnInfo(playerid, NO_TEAM, Player[playerid][IDSkin], 1248.2993,-1563.6338,12.6017, 186.4331, 0, 0, 0, 0, 0, 0);
571 SetPlayerInterior(playerid, 12);
572 TogglePlayerControllable(playerid, 1);
573 SpawnPlayer(playerid);
574 ClearPlayerChat(playerid);
575 SendClientMessage(playerid, -1, INFO_STRING"Logowanie udane. Życzymy pomyślnej gry !");
576 new ip[18];
577 GetPlayerIp(playerid, ip, 18);
578 mysql_format(SQL_ID, query, sizeof query, "UPDATE players_accounts SET lastip = '%s', lastonline = NOW() WHERE uid = %i", ip, Player[playerid][UID]);
579 mysql_tquery(SQL_ID, query);
580 }
581 else
582 {
583 // hasło błędne
584 ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, "Logowanie", "Znaleźliśmy rejestrację Twojego konta. \n\tPodaj hasło aby zagrać.", "Logowanie", "Opuść Serwer");
585 SendClientMessage(playerid, -1, ERROR_STRING"Hasło nieprawidłowe. Spróbuj ponownie!");
586 }
587 //nic nie wpisane
588 }
589 else
590 {
591 ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, "Logowanie", "Znaleźliśmy rejestrację Twojego konta. \n\tPodaj hasło aby zagrać.", "Logowanie", "Opuść Serwer");
592 SendClientMessage(playerid, -1, ERROR_STRING"Nie wprowadzono hasła! Spróbuj ponownie!");
593 }
594 }
595 else KickEX(playerid);
596 }
597 case REGISTER3_DIALOG: // Rejestracja wiek
598 {
599 if(response)
600 {
601 if(IsNumeric(inputtext) && strlen(inputtext) == 2 && strval(inputtext) >= 13 && strval(inputtext) <= 30 )
602 {
603 Player[playerid][Age] = strval(inputtext);
604 Player[playerid][Age] = strval(inputtext);
605 SetPlayerPos(playerid, 2324.3662, -1148.7382, 1050.7101);
606 SetPlayerInterior(playerid, 12);
607 SetPlayerFacingAngle(playerid, 359.6589);
608 InterpolateCameraPos(playerid, 2324.4150, -1138.6611, 1051.4922, 2324.3513, -1144.7060, 1050.7031, 5000, CAMERA_CUT);
609 InterpolateCameraLookAt(playerid, 2324.3662, -1148.7382, 1050.7101, 2324.3513, -1144.7360, 1050.7031, 5000, CAMERA_CUT);
610 Player[playerid][SelectedIDSkin] = 0;
611 new sskin = Player[playerid][SelectedIDSkin];
612 if(Player[playerid][Gender] == GENDER_MALE)
613 {
614 SetPlayerSkin(playerid, Skins_Male[sskin][0]);
615 Player[playerid][IDSkin] = Skins_Male[sskin][0];
616 }
617 else
618 {
619 SetPlayerSkin(playerid, Skins_Female[sskin][0]);
620 Player[playerid][IDSkin] = Skins_Female[sskin][0];
621 }
622 TextDrawHideForPlayer(playerid, loginscreen);
623 TextDrawHideForPlayer(playerid, loginbutton);
624 TextDrawHideForPlayer(playerid, registerbutton);
625 TextDrawShowForPlayer(playerid, SkinSelector_Title);
626 TextDrawShowForPlayer(playerid, skinnr);
627 TextDrawShowForPlayer(playerid, SkinSelector_Accept);
628 TextDrawShowForPlayer(playerid, SkinSelector_Right);
629 TextDrawShowForPlayer(playerid, SkinSelector_Left);
630 }
631 else
632 {
633 ShowPlayerDialog(playerid, REGISTER3_DIALOG, DIALOG_STYLE_INPUT, "Rejestracja", "Podaj swój wiek", "Akceptuj", "Opuść Serwer");
634 SendClientMessage(playerid, -1, ERROR_STRING"Żeby zagrać musisz mieć 13-30 lat!");
635 }
636 }
637 else KickEX(playerid);
638 }
639 case REGISTER2_DIALOG: // Rejestracja wybór Gender
640 { TextDrawShowForPlayer(playerid, loginscreen);
641 TextDrawShowForPlayer(playerid, loginbutton);
642 TextDrawShowForPlayer(playerid, registerbutton);
643 Player[playerid][Gender] = response;
644 ShowPlayerDialog(playerid, REGISTER3_DIALOG, DIALOG_STYLE_INPUT, "Rejestracja", "Podaj swój wiek", "Akceptuj", "Opuść Serwer");
645 }
646 case REGISTER1_DIALOG: //zAKÅADNIE KONTA
647 {
648 if(response)
649 {
650 if(strlen(inputtext) >= 8 && IsStrValid(inputtext))
651 {
652 WP_Hash(Player[playerid][Password], 129, inputtext);
653 ShowPlayerDialog(playerid, REGISTER2_DIALOG, DIALOG_STYLE_MSGBOX, "Rejestracja", "Wybierz swoją przynależność sexualną.", "Kobieta", "Mężczyzna");
654 }
655 else
656 { TextDrawShowForPlayer(playerid, loginscreen);
657 TextDrawShowForPlayer(playerid, loginbutton);
658 TextDrawShowForPlayer(playerid, registerbutton);
659 ShowPlayerDialog(playerid, REGISTER1_DIALOG, DIALOG_STYLE_PASSWORD, "REJESTRACJA", "Aby zagrać na serwerze, prosimy stwórz konto. \n\tHasło proszę wpisać poniżej", "Akceptuj", "Anuluj");
660 SendClientMessage(playerid, -1, ERROR_STRING"Hasło powinno zawierać min. 8 zanków, nie może zawierać przerw ani znaków specjalnych!!");
661 }
662 }
663 else KickEX(playerid);
664 }
665 }
666 return 1;
667}
668
669public OnPlayerClickTextDraw(playerid, Text:clickedid)
670{
671 if(clickedid == loginbutton)
672 {
673 new ip[18], query[256];
674 GetPlayerIp(playerid, ip, 18);
675 mysql_format(SQL_ID, query, sizeof query, "SELECT * FROM players_accounts WHERE Login = '%s' LIMIT 1", PlayerName(playerid));
676 mysql_tquery(SQL_ID, query, "OnAccountCheck", "iss", playerid, ip, PlayerName(playerid));
677 }
678
679 if(clickedid == registerbutton)
680 {
681 new ip[18], query[256];
682 GetPlayerIp(playerid, ip, 18);
683 mysql_format(SQL_ID, query, sizeof query, "SELECT * FROM players_accounts WHERE Login = '%s' LIMIT 1", PlayerName(playerid));
684 mysql_tquery(SQL_ID, query, "OnAccountCheck", "iss", playerid, ip, PlayerName(playerid));
685 }
686
687 if(clickedid == SkinSelector_Right) //Wybor postaci nastepna postac
688 {
689 if(Player[playerid][Gender] == GENDER_MALE) //Mezczyzni
690 {
691 if(Player[playerid][SelectedIDSkin] == (sizeof Skins_Male - 1))
692 Player[playerid][SelectedIDSkin] = 0;
693 else
694 Player[playerid][SelectedIDSkin]++;
695 new sskin = Player[playerid][SelectedIDSkin];
696 SetPlayerSkin(playerid, Skins_Male[sskin][0]);
697 Player[playerid][IDSkin] = Skins_Male[sskin][0];
698 }
699 else //Kobiety
700 {
701 if(Player[playerid][SelectedIDSkin] == (sizeof Skins_Female - 1))
702 Player[playerid][SelectedIDSkin] = 0;
703 else
704 Player[playerid][SelectedIDSkin]++;
705 new sskin = Player[playerid][SelectedIDSkin];
706 SetPlayerSkin(playerid, Skins_Female[sskin][0]);
707 Player[playerid][IDSkin] = Skins_Female[sskin][0];
708 }
709 }
710 if(clickedid == SkinSelector_Left) //Wybor postaci poprzednia postac
711 {
712 if(Player[playerid][Gender] == GENDER_MALE) //Mezczyzni
713 {
714 if(Player[playerid][SelectedIDSkin] == 0)
715 Player[playerid][SelectedIDSkin] = (sizeof Skins_Male - 1);
716 else
717 Player[playerid][SelectedIDSkin]--;
718 new sskin = Player[playerid][SelectedIDSkin];
719 SetPlayerSkin(playerid, Skins_Male[sskin][0]);
720 Player[playerid][IDSkin] = Skins_Male[sskin][0];
721 }
722 else //Kobiety
723 {
724 if(Player[playerid][SelectedIDSkin] == 0)
725 Player[playerid][SelectedIDSkin] = (sizeof Skins_Female - 1);
726 else
727 Player[playerid][SelectedIDSkin]--;
728 new sskin = Player[playerid][SelectedIDSkin];
729 SetPlayerSkin(playerid, Skins_Female[sskin][0]);
730 Player[playerid][IDSkin] = Skins_Female[sskin][0];
731 }
732 }
733 if(clickedid == SkinSelector_Accept)
734 {
735 TextDrawHideForPlayer(playerid, SkinSelector_Title);
736 TextDrawHideForPlayer(playerid, skinnr);
737 TextDrawHideForPlayer(playerid, SkinSelector_Accept);
738 TextDrawHideForPlayer(playerid, SkinSelector_Right);
739 TextDrawHideForPlayer(playerid, SkinSelector_Left);
740 TextDrawHideForPlayer(playerid, loginscreen);
741 TextDrawHideForPlayer(playerid, loginbutton);
742 TextDrawHideForPlayer(playerid, registerbutton);
743 CreateAccount(playerid);
744 TogglePlayerSpectating(playerid, false);
745 SetCameraBehindPlayer(playerid);
746 TogglePlayerControllable(playerid, true);
747 }
748 return 1;
749}
750public OnPlayerUpdate(playerid)
751{
752
753 return 1;
754}
755
756public OnPlayerSpawn(playerid)
757{
758
759 if(Player[playerid][LoggedIn] == false)
760 {
761 // nie zalogowany
762 SetPlayerSkin(playerid, GetRandomSkin());
763 SetPlayerInterior(playerid, 12);
764 SetPlayerPos(playerid, 2324.3040, -1135.8479, 1051.3047);
765 SetPlayerFacingAngle(playerid, 180.2658);
766 SetPlayerVirtualWorld(playerid, 50 + playerid);
767 SetPlayerCameraPos(playerid, 2324.5247, -1138.4045, 1050.4990);
768 SetPlayerCameraLookAt(playerid, 2324.3040, -1135.8479, 1051.3047);
769 TogglePlayerControllable(playerid, false);
770 ShowPlayerMouse(playerid, true);
771 }
772 else
773 {
774 TextDrawShowForPlayer(playerid, czas);
775 TextDrawShowForPlayer(playerid, data);
776 TextDrawShowForPlayer(playerid, Tday);
777 TextDrawHideForPlayer(playerid,Date);
778 TextDrawHideForPlayer(playerid,UrlWeb);
779 TextDrawHideForPlayer(playerid,Textura[0]);
780 TextDrawHideForPlayer(playerid,Textura[1]);
781 TextDrawHideForPlayer(playerid,Belt[0]);
782 TextDrawHideForPlayer(playerid,Belt[1]);
783 TextDrawHideForPlayer(playerid,Belt[2]);
784 TextDrawHideForPlayer(playerid,Belt[3]);
785 TextDrawHideForPlayer(playerid,Belt[4]);
786 TextDrawHideForPlayer(playerid,Belt[5]);
787 //zalogowany
788 if(Player[playerid][FirstSpawn] && Player[playerid][LastPos] != 0)
789 {
790 SetPlayerPos(playerid, Player[playerid][LastPos][0], Player[playerid][LastPos][1], Player[playerid][LastPos][2]);
791 SetPlayerFacingAngle(playerid, Player[playerid][LastPos][3]);
792 SetPlayerInterior(playerid, Player[playerid][Linterior]);
793 SetPlayerVirtualWorld(playerid, Player[playerid][LVW]);
794 SetPlayerHealth(playerid, Player[playerid][HP]);
795 SetPlayerArmour(playerid, Player[playerid][Armour]);
796 }
797 else
798 {
799 SetPlayerInterior(playerid, 0);
800 SetPlayerVirtualWorld(playerid, 0);
801 }
802 SetPlayerSkin(playerid, Player[playerid][IDSkin]);
803 TogglePlayerControllable(playerid, true);
804 SetCameraBehindPlayer(playerid);
805 ShowPlayerMouse(playerid, false);
806 Player[playerid][FirstSpawn] = false;
807 TextDrawHideForPlayer(playerid, loginscreen);
808 TextDrawHideForPlayer(playerid, loginbutton);
809 TextDrawHideForPlayer(playerid, registerbutton);
810 TogglePlayerSpectating(playerid, false);
811 SetCameraBehindPlayer(playerid);
812 TogglePlayerControllable(playerid, true);
813 }
814 return 1;
815}
816
817//CALLBACK MYSQL
818
819forward td_refresh();
820public td_refresh()
821{
822 /* ODSWIEZANIE GRACZY ONLINE */
823 format(td_string, sizeof(td_string), "Online: ~y~%d", Iter_Count(Player));
824 TextDrawSetString(Online, td_string);
825
826 foreach (new playerid : Player)
827 {
828 z1 = gettime() - GetPVarInt(playerid, "oTime");
829 z2 = z1/60;
830 z3 = z1/3600;
831
832 /* ODSWIEZANIE CZASU GRY */
833 format(td_string, sizeof(td_string), "%02d~y~h ~w~%02d~y~min", z3, z2);
834 PlayerTextDrawSetString(playerid, Belt_Player[TIME_ONLINE][playerid], td_string);
835
836 /* ODSWIEZANIE PIENIEDZY */
837 format(td_string, sizeof(td_string), "Pieniedzy: ~y~%d~w~$", GetPlayerMoney(playerid));
838 PlayerTextDrawSetString(playerid, Belt_Player[PLAYER_MONEY][playerid], td_string);
839
840 /* ODSWIEZANIE SCORE */
841 format(td_string, sizeof(td_string), "Respekt: ~y~%d", GetPlayerScore(playerid));
842 PlayerTextDrawSetString(playerid, Belt_Player[PLAYER_SCORE][playerid], td_string);
843 }
844 return 1;
845}
846
847forward OnAccountCreate(playerid);
848public OnAccountCreate(playerid)
849{
850 SendClientMessage(playerid, -1, INFO_STRING"Gratuluję! Twoje Konto zostało pomyślnie stworzone.Życzymy udanej gry, Administracja serwera.");
851
852 SetPlayerPos(playerid, 1223.1229,-1814.7272,16.5938); //ustaw koordynaty
853 SetPlayerVirtualWorld(playerid, 0);
854 SetPlayerInterior(playerid, 0);
855 SetCameraBehindPlayer(playerid);
856 TogglePlayerControllable(playerid, true);
857 ShowPlayerMouse(playerid, false);
858 return 1;
859}
860
861forward OnAccountCheck(playerid, ip[], name[]);
862public OnAccountCheck (playerid, ip[], name[])
863{
864 if(!IsPlayerConnected(playerid))
865 return 1;
866 new tmpip[18];
867 GetPlayerIp(playerid, tmpip, 18);
868 if(strcmp(ip, tmpip, true) != 0 && strcmp(name, PlayerName(playerid)) != 0)
869 return KickEX(playerid);
870 if(cache_num_rows() > 0)
871 {
872 //konto odnalezione
873 cache_get_value(0, "password", Player[playerid][Password], 129);
874 Player[playerid][Cache_ID] = cache_save();
875 ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, "Logowanie", "Znaleźliśmy rejestrację Twojego konta. \n\tPodaj hasło aby zagrać.", "Logowanie", "Opuść Serwer");
876 }
877 else
878 {
879 //Konton nie odnalezione
880 ShowPlayerDialog(playerid, REGISTER1_DIALOG, DIALOG_STYLE_PASSWORD, "REJESTRACJA", "Aby zagrać na serwerze, prosimy stwórz konto. \n\tHasło proszę wpisać poniżej", "Akceptuj", "Anuluj");
881 }
882 return 1;
883}
884
885stock ZaladujDate()
886{
887 getdate(year, month, day);
888
889 new string[32];
890 format(string, sizeof string, "%02d/%02d/%d", day, month, year);
891 TextDrawSetString(data, string);
892 return 1;
893}
894
895stock ZaladujCzas()
896{ new Second;
897 gettime(Hour, Minute, Second);
898
899 new string[32];
900 format(string, sizeof string,"%02d:%02d:%02d", Hour, Minute, Second);
901 TextDrawSetString(czas, string);
902 format(string, sizeof string, "%s", GetWeekDay());
903 TextDrawSetString(Tday, string);
904 return 1;
905}
906
907stock IsNumeric(const string[])
908{
909 for (new i = 0, j = strlen(string); i < j; i++)
910 {
911 if (string[i] > '9' || string[i] < '0') return 0;
912 }
913 return 1;
914}
915
916stock bool:IsStrValid(const string[])
917{
918 new num;
919 new len = strlen(string);
920 for(new i; i < len; i++)
921 switch(string[i])
922 {
923 case 'A'..'Z':num++;
924 case 'a'..'z':num++;
925 case '0'..'9':num++;
926 }
927 if(num == len) return true;
928 else return false;
929}
930
931//Timery
932
933
934forward UnFreezePlayer(playerid);
935public UnFreezePlayer(playerid)
936{
937 Player[playerid][IsFreezed] = false;
938 TogglePlayerControllable(playerid, true);
939 return 1;
940}
941
942forward DelayKick(playerid);
943public DelayKick(playerid)
944 return Kick(playerid);
945
946forward SecondUpdate();
947public SecondUpdate()
948{
949 ZaladujCzas();
950
951 for(new playerid, j = GetPlayerPoolSize(); playerid <= j; playerid++)
952 {
953 if(IsPlayerConnected(playerid))
954 {
955 if(Player[playerid][ShowMouse])
956 {
957 ShowPlayerMouse(playerid, true);
958 }
959 }
960 }
961 return 1;
962}
963
964
965 //CMD
966
967CMD:kolorpojazdu(playerid, params[])
968{
969 if(IsPlayerInAnyVehicle(playerid))
970 {
971 new color1, color2;
972 if(sscanf(params, "ii", color1) == 0)
973 {
974 new vehicleid = GetPlayerVehicleID(playerid);
975 ChangeVehicleColor(vehicleid, color1, color2);
976 SendClientMessage(playerid, -1, "Kolor pojazdu został zmieniony!");
977 }
978 else SendClientMessage(playerid, -1, ERROR_STRING"Użyj: /kolorpojazdu [id koloru] [id koloru]");
979 }
980 else SendClientMessage(playerid, -1, ERROR_STRING"Nie jesteś w żadnym pojeździe.");
981 return 1;
982}
983
984CMD:napraw(playerid, params[])
985{
986 if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Nie jesteś aktualnie w pojeździe !");
987 if(GetPlayerMoney(playerid) >= 100)
988 {
989 new vid = GetPlayerVehicleID(playerid); // zmienna pobierajÄ…ca ID pojazdu gracza
990 RepairVehicle(vid); // naprawia pojazd
991 GivePlayerMoney(playerid, FIX_CAR_COST); // Zabiera 100 za naprawÄ™
992 SendClientMessage(playerid, -1, INFO_STRING"Twój pojazd został naprawiony kosztem 100$ !"); //wiadomość o zabraniu 100$ i naprawie auta
993 }
994 else
995 {
996 SendClientMessage(playerid, -1, ERROR_STRING"Nie masz hajsów na naprawę !");
997 }
998 return 1;
999}
1000
1001CMD:ooc(playerid, params[])
1002{
1003 new message[128], string[192];
1004 if(sscanf(params, "s[128]", message)) SendClientMessage(playerid, -1, "{008040}UŻYJ: /OOC [Wiadomość dla czatu globalnego]");
1005 else
1006 {
1007 format(string, sizeof string, "OOC | %s [%i]: %s", PlayerName(playerid), playerid, message);
1008 SendClientMessageToAll(COLOR_WHITE, string);
1009 }
1010 return 1;
1011}
1012
1013
1014CMD:krzycz(playerid, params[])
1015{
1016 new message[128], string[192];
1017 if(sscanf(params, "s[128]", message)) SendClientMessage(playerid, -1, "{FF8040}UŻYJ: /krzycz [Wiadomość]");
1018 else
1019 {
1020 format(string, sizeof string, "%s [%i] krzczy! : %s", PlayerName(playerid), playerid, message);
1021 SendClientMessageInRange(playerid, COLOR_LIGHT_GREY, 35.0, string);
1022 }
1023 return 1;
1024}
1025
1026
1027CMD:me(playerid, params[])
1028{
1029 new message[128], string[192];
1030 if(sscanf(params, "s[128]", message)) SendClientMessage(playerid, -1, "{80FF80}UŻYJ: /me[Czynność]");
1031 else
1032 {
1033 format(string, sizeof string, "* %s %s", PlayerName(playerid), message);
1034 SendClientMessageInRange(playerid, COLOR_PURPLE_DARK, 60.0, string);
1035 }
1036 return 1;
1037}
1038
1039
1040
1041
1042CMD:do(playerid, params[])
1043{
1044 new message[128], string[192];
1045 if(sscanf(params, "s[128]", message)) SendClientMessage(playerid, -1, "{804040}UŻYJ: /do[Opis Sytuacji]");
1046 else
1047 {
1048 format(string, sizeof string, "[%i] ( %s )", playerid, message);
1049 SendClientMessageInRange(playerid, COLOR_MORSKI, 80.0, string);
1050 }
1051 return 1;
1052}
1053
1054
1055
1056//STOCKI
1057
1058
1059
1060stock Respekt(playerid,score) SetPlayerScore(playerid,GetPlayerScore(playerid) + score);
1061
1062
1063stock CreateVehiclePlayer(playerid, modelid, Float:X, Float:Y, Float:Z)
1064{
1065 new vehicleid = CreateVehicle(modelid, X, Y, Z, 0.0, 0, 0, -1, 0);
1066 PutPlayerInVehicle(playerid, vehicleid, 0);
1067 return 1;
1068}
1069
1070stock GetPlayerVehicleIDFromString(vName[])
1071{
1072 for(new x; x != 211; x++) if(strfind(VehicleName[x], vName, true) != -1) return x + 400;
1073 return INVALID_VEHICLE_ID;
1074}
1075
1076stock GetWeekDay(days=0, months=0, years=0)
1077{
1078 if (!days)
1079 getdate(years, months, days);
1080
1081 new
1082 weekday_str[15],
1083 j,
1084 e
1085 ;
1086
1087 if (month <= 2)
1088 {
1089 month += 12;
1090 --year;
1091 }
1092
1093 j = year % 100;
1094 e = year / 100;
1095
1096 switch ((day + (month+1)*26/10 + j + j/4 + e/4 - 2*e) % 7)
1097 {
1098 case 0: weekday_str = "Sobota";
1099 case 1: weekday_str = "Niedziela";
1100 case 2: weekday_str = "Poniedzialek";
1101 case 3: weekday_str = "Wtorek";
1102 case 4: weekday_str = "Sroda";
1103 case 5: weekday_str = "Czwartek";
1104 case 6: weekday_str = "Piatek";
1105 }
1106
1107 return weekday_str;
1108}
1109
1110
1111stock StworzBrame()
1112{
1113 brama[0] = CreateDynamicObject(2990, 1003.76, -643.771, 124.317, 1.0, 0.5, 29.4, -1, -1, -1, STREAMER_OBJECT_SD, STREAMER_OBJECT_DD, -1, 0);
1114 return 1;
1115}
1116
1117stock UsunBramy()
1118{
1119 for(new i; i < sizeof brama; i++)
1120 DestroyDynamicObject(i);
1121 return 1;
1122}
1123
1124stock SendClientMessageInRange(playerid, color, Float:range, text[])
1125{
1126 new Float:x, Float:y, Float:z;
1127 GetPlayerPos(playerid, x, y, z);
1128 for(new i, j = GetPlayerPoolSize(); i <= j; i++)
1129 {
1130 if(IsPlayerConnected(i))
1131 {
1132 if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
1133 {
1134 if(IsPlayerInRangeOfPoint(i, range, x, y, z))
1135 {
1136 SendClientMessage(i, color, text);
1137 }
1138 }
1139 }
1140 }
1141 return 1;
1142}
1143
1144
1145stock ConnectEntrances(id1, id2)
1146{
1147 Entrance[id1][e_conid] = id2;
1148 Entrance[id2][e_conid] = id1;
1149 return 1;
1150}
1151
1152stock FreezePlayer(playerid, interval, text[])
1153{
1154 new string[128];
1155 format(string, sizeof string, "~p~%s", text);
1156 TogglePlayerControllable(playerid, false);
1157 SetTimerEx("UnFreeze", interval, false, "i", playerid);
1158 GameTextForPlayer(playerid, string, interval, 6);
1159 Player[playerid][IsFreezed] = true;
1160 return 1;
1161}
1162
1163
1164stock CreateEntrance(const name[], Float:x, Float:y, Float:z, Float:rotacja, interior, virtualworld, pickupid = -1, mapiconid = -1, bool:freezeplayer = false)
1165{
1166 new string[128];
1167 new entid =entranceindex;
1168 Entrance[entid][e_posx] = x;
1169 Entrance[entid][e_posy] = y;
1170 Entrance[entid][e_posz] = z;
1171 Entrance[entid][e_rotation] = rotacja;
1172 Entrance[entid][e_interior] = interior;
1173 Entrance[entid][e_vw] = virtualworld;
1174 Entrance[entid][e_freeze] = freezeplayer;
1175 if(pickupid == -1)
1176 {
1177 pickupid = 1318;
1178 if(mapiconid != -1)
1179 CreateDynamicMapIcon(x, y, z, mapiconid, 0, virtualworld, interior, -1, 800, MAPICON_GLOBAL, -1, 0);
1180 CreateDynamicPickup(pickupid, 1, x, y, z, virtualworld, interior);
1181 format(string,sizeof string, "{F3DC3A}%s\n{FFFFFF}Aby wejść wciśnij : {D34BF5}ENTER", name);
1182 CreateDynamic3DTextLabel(string, -1, x, y, z, 15, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, virtualworld, interior, -1, 15);
1183 entranceindex++;
1184 }
1185 return entid;
1186}
1187
1188stock GetRandomSkin()
1189{
1190 new rgender = random(2);
1191 if(rgender == 1)
1192 {
1193 new rand = random(sizeof Skins_Male);
1194 return Skins_Male[rand][0];
1195 }
1196 else if(rgender == 0)
1197 {
1198 new rand = random(sizeof Skins_Female);
1199 return Skins_Female[rand][0];
1200 }
1201 return 0;
1202}
1203
1204
1205stock KickEX(playerid, delay = 1000)
1206 return SetTimerEx("DelayKick", delay, false, "i", playerid);
1207
1208stock AssignPlayerData(playerid)
1209{
1210 cache_set_active(Player[playerid][Cache_ID]);
1211
1212 cache_get_value_int(0, "uid", Player[playerid][UID]);
1213 cache_get_value_int(0, "IDSkina", Player[playerid][IDSkin]);
1214 cache_get_value_int(0, "money", Player[playerid][Money]);
1215 cache_get_value_int(0, "gender", Player[playerid][Gender]);
1216 cache_get_value_int(0, "age", Player[playerid][Age]);
1217 cache_get_value_int(0, "lvl", Player[playerid][Lvl]);
1218 cache_get_value_int(0, "admin_lv", Player[playerid][AdminLV]);
1219
1220 cache_get_value_float(0, "lastposx",Player[playerid][LastPos][0]);
1221 cache_get_value_float(0, "lastposy",Player[playerid][LastPos][1]);
1222 cache_get_value_float(0, "lastposz",Player[playerid][LastPos][2]);
1223 cache_get_value_float(0, "lastposrot",Player[playerid][LastPos][3]);
1224 cache_get_value_int(0, "linterior",Player[playerid][Linterior]);
1225 cache_get_value_int(0, "lvw",Player[playerid][LVW]);
1226 cache_get_value_float(0, "hp",Player[playerid][HP]);
1227 cache_get_value_float(0, "armour",Player[playerid][Armour]);
1228
1229 cache_delete(Player[playerid][Cache_ID]);
1230 Player[playerid][Cache_ID] = MYSQL_INVALID_CACHE;
1231 return 1;
1232}
1233
1234stock ResetPlayerData(playerid)
1235{
1236 if(cache_is_valid(Player[playerid][Cache_ID]))
1237 {
1238 cache_delete(Player[playerid][Cache_ID]);
1239 Player[playerid][Cache_ID] = MYSQL_INVALID_CACHE;
1240 }
1241 static const null_players[DataPlayer];
1242 Player[playerid] = null_players;
1243 return 1;
1244}
1245
1246stock PlayerName(playerid)
1247{
1248 new name[MAX_PLAYER_NAME];
1249 GetPlayerName(playerid, name, sizeof name);
1250 return name;
1251}
1252
1253forward ShowPlayerMouse(playerid, bool:show);
1254public ShowPlayerMouse(playerid, bool:show)
1255{
1256 if(show)
1257 {
1258 SelectTextDraw(playerid, 0xFF0000FF);
1259 Player[playerid][ShowMouse] = true;
1260 }
1261 else
1262 {
1263 CancelSelectTextDraw(playerid);
1264 Player[playerid][ShowMouse] = false;
1265 }
1266 return 1;
1267}
1268
1269stock ClearPlayerChat(playerid)
1270{
1271 for(new i; i < 15; i++)
1272 SendClientMessage(playerid, -1, " ");
1273 return 1;
1274}
1275
1276 stock SaveAccount(playerid)
1277 {
1278 new query[258];
1279 new Float:tempPos[4], Float:hp, Float:armour;
1280 GetPlayerHealth(playerid, hp);
1281 GetPlayerArmour(playerid, armour);
1282 GetPlayerPos(playerid, tempPos[0], tempPos[1], tempPos[2]);
1283 GetPlayerFacingAngle(playerid, tempPos[3]);
1284 if(hp > 100 && !IsPlayerAdmin(playerid)) hp = 100;
1285 if(armour > 100&& !IsPlayerAdmin(playerid)) armour = 100;
1286 mysql_format(SQL_ID, query, sizeof query, "UPDATE players_accounts SET money =%i, IDSkina = %i, lvl = %i, lastposx = %f, lastposy = %f, lastposz = %f, \
1287 lastposrot = %f, linterior = %i, lvw = %i, hp = %f, armour = %f WHERE uid = %i",
1288 GetPlayerMoney(playerid),
1289 Player[playerid][IDSkin],
1290 GetPlayerScore(playerid),
1291 tempPos[0], tempPos[1], tempPos[2], tempPos[3],
1292 GetPlayerInterior(playerid),
1293 GetPlayerVirtualWorld(playerid),
1294 hp,armour,
1295 Player[playerid][UID]);
1296 mysql_tquery(SQL_ID, query);
1297 return 1;
1298 }
1299
1300 stock CreateAccount(playerid)
1301{
1302 new query[258], string[258];
1303 strcat(query, "INSERT INTO players_accounts(");
1304 //
1305 strcat(query, "Login, ");
1306 strcat(query, "password, ");
1307 strcat(query, "IDSkina, ");
1308 strcat(query, "age, ");
1309 strcat(query, "gender, ");
1310 strcat(query, "money");
1311 //
1312 strcat(query, ")VALUES(");
1313 //
1314 format(string, 258, "'%s',",PlayerName(playerid));
1315 strcat(query,string);
1316 format(string, 258, "'%s',",Player[playerid][Password]);
1317 strcat(query,string);
1318 format(string, 258, "'%i',",Player[playerid][IDSkin]);
1319 strcat(query,string);
1320 format(string, 258, "'%i',",Player[playerid][Age]);
1321 strcat(query,string);
1322 format(string, 258, "'%i',",Player[playerid][Gender]);
1323 strcat(query,string);
1324 format(string, 258, "'%i'",MONEY_MONEY_START);
1325 strcat(query,string);
1326 //
1327 strcat(query,")");
1328 mysql_tquery(SQL_ID, query, "OnAccountCreate", "i", playerid);
1329 return 1;
1330}
1331
1332stock MySQL_SetUpTables ()
1333{
1334 mysql_tquery(SQL_ID, " CREATE TABLE IF NOT EXISTS `Players Accounts` ( \
1335 `uid` INT(11) NOT NULL AUTO_INCREMENT, \
1336 `Login` TEXT NOT NULL COLLATE 'utf8_polish_ci', \
1337 `password` TEXT NOT NULL COLLATE 'utf8_polish_ci', \
1338 `ID Skina` INT(11) NOT NULL, \
1339 `money` INT(11) NOT NULL DEFAULT '0', \
1340 `gender` INT(11) NOT NULL, \
1341 `age` INT(11) NOT NULL, \
1342 `lvl` INT(11) NOT NULL DEFAULT '1', \
1343 `admin lv` INT(11) NOT NULL DEFAULT '0', \
1344 `lastip` TEXT NOT NULL COLLATE 'utf8_polish_ci', \
1345 `lastonline` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, \
1346 `createdate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, \
1347 PRIMARY KEY (`uid`))");
1348 return 1;
1349}
1350
1351stock MySQL_Init()
1352{
1353 mysql_log();
1354 SQL_ID = mysql_connect_file("mysql.ini");
1355 if(SQL_ID == MYSQL_INVALID_HANDLE ||mysql_errno(SQL_ID) != 0)
1356 {
1357 print("[MYSQL - BLAD] Nie można było połączyć się z bazą danych! Serwer wyłączony ..!");
1358 SendRconCommand("exit");
1359 return 0;
1360 }
1361 print("[MYSQL] Połączenie z bazą danych zostało nawiązane!");
1362 return 1;
1363}
1364
1365// Stock TD
1366
1367stock CreateGlobalTD()
1368{
1369 SkinSelector_Title = TextDrawCreate(232.000000, -5.000000, "mdl-1001:skin");
1370 TextDrawFont(SkinSelector_Title, 4);
1371 TextDrawLetterSize(SkinSelector_Title, 0.600000, 2.000000);
1372 TextDrawTextSize(SkinSelector_Title, 187.000000, 102.500000);
1373 TextDrawSetOutline(SkinSelector_Title, 1);
1374 TextDrawSetShadow(SkinSelector_Title, 0);
1375 TextDrawAlignment(SkinSelector_Title, 1);
1376 TextDrawColor(SkinSelector_Title, -1);
1377 TextDrawBackgroundColor(SkinSelector_Title, 255);
1378 TextDrawBoxColor(SkinSelector_Title, 50);
1379 TextDrawUseBox(SkinSelector_Title, 1);
1380 TextDrawSetProportional(SkinSelector_Title, 1);
1381 TextDrawSetSelectable(SkinSelector_Title, 0);
1382
1383 SkinSelector_Right = TextDrawCreate(420.000000, 287.000000, "mdl-1001:prawo");
1384 TextDrawFont(SkinSelector_Right, 4);
1385 TextDrawLetterSize(SkinSelector_Right, 0.600000, 2.000000);
1386 TextDrawTextSize(SkinSelector_Right, 172.000000, 75.000000);
1387 TextDrawSetOutline(SkinSelector_Right, 1);
1388 TextDrawSetShadow(SkinSelector_Right, 0);
1389 TextDrawAlignment(SkinSelector_Right, 1);
1390 TextDrawColor(SkinSelector_Right, -1);
1391 TextDrawBackgroundColor(SkinSelector_Right, 255);
1392 TextDrawBoxColor(SkinSelector_Right, 50);
1393 TextDrawUseBox(SkinSelector_Right, 1);
1394 TextDrawSetProportional(SkinSelector_Right, 1);
1395 TextDrawSetSelectable(SkinSelector_Right, 1);
1396
1397 SkinSelector_Left = TextDrawCreate(112.000000, 285.000000, "mdl-1001:lewo");
1398 TextDrawFont(SkinSelector_Left, 4);
1399 TextDrawLetterSize(SkinSelector_Left, 0.600000, 2.000000);
1400 TextDrawTextSize(SkinSelector_Left, 172.000000, 75.000000);
1401 TextDrawSetOutline(SkinSelector_Left, 1);
1402 TextDrawSetShadow(SkinSelector_Left, 0);
1403 TextDrawAlignment(SkinSelector_Left, 1);
1404 TextDrawColor(SkinSelector_Left, -1);
1405 TextDrawBackgroundColor(SkinSelector_Left, 255);
1406 TextDrawBoxColor(SkinSelector_Left, 50);
1407 TextDrawUseBox(SkinSelector_Left, 1);
1408 TextDrawSetProportional(SkinSelector_Left, 1);
1409 TextDrawSetSelectable(SkinSelector_Left, 1);
1410
1411 SkinSelector_Accept = TextDrawCreate(286.000000, 271.000000, "mdl-1001:wybierz");
1412 TextDrawFont(SkinSelector_Accept, 4);
1413 TextDrawLetterSize(SkinSelector_Accept, 0.600000, 2.000000);
1414 TextDrawTextSize(SkinSelector_Accept, 133.500000, 99.000000);
1415 TextDrawSetOutline(SkinSelector_Accept, 1);
1416 TextDrawSetShadow(SkinSelector_Accept, 0);
1417 TextDrawAlignment(SkinSelector_Accept, 1);
1418 TextDrawColor(SkinSelector_Accept, -1);
1419 TextDrawBackgroundColor(SkinSelector_Accept, 255);
1420 TextDrawBoxColor(SkinSelector_Accept, 50);
1421 TextDrawUseBox(SkinSelector_Accept, 1);
1422 TextDrawSetProportional(SkinSelector_Accept, 1);
1423 TextDrawSetSelectable(SkinSelector_Accept, 1);
1424
1425
1426 skinnr = TextDrawCreate(429.000000, 20.000000, "0");
1427 TextDrawFont(skinnr, 3);
1428 TextDrawLetterSize(skinnr, 0.941666, 4.449998);
1429 TextDrawTextSize(skinnr, 400.000000, 17.000000);
1430 TextDrawSetOutline(skinnr, 1);
1431 TextDrawSetShadow(skinnr, 0);
1432 TextDrawAlignment(skinnr, 1);
1433 TextDrawColor(skinnr, -1);
1434 TextDrawBackgroundColor(skinnr, 255);
1435 TextDrawBoxColor(skinnr, 50);
1436 TextDrawUseBox(skinnr, 0);
1437 TextDrawSetProportional(skinnr, 1);
1438 TextDrawSetSelectable(skinnr, 0);
1439
1440 loginscreen = TextDrawCreate(0.000000, -2.000000, "mdl-1000:logowanie samp");
1441 TextDrawFont(loginscreen, 4);
1442 TextDrawLetterSize(loginscreen, 0.600000, 2.000000);
1443 TextDrawTextSize(loginscreen, 641.500000, 453.500000);
1444 TextDrawSetOutline(loginscreen, 1);
1445 TextDrawSetShadow(loginscreen, 0);
1446 TextDrawAlignment(loginscreen, 1);
1447 TextDrawColor(loginscreen, -1);
1448 TextDrawBackgroundColor(loginscreen, 255);
1449 TextDrawBoxColor(loginscreen, 50);
1450 TextDrawUseBox(loginscreen, 1);
1451 TextDrawSetProportional(loginscreen, 1);
1452 TextDrawSetSelectable(loginscreen, 0);
1453
1454 loginbutton = TextDrawCreate(121.000000, 219.000000, "mdl-1000:loginbutton");
1455 TextDrawFont(loginbutton, 4);
1456 TextDrawLetterSize(loginbutton, 0.600000, 2.000000);
1457 TextDrawTextSize(loginbutton, 130.500000, 84.000000);
1458 TextDrawSetOutline(loginbutton, 1);
1459 TextDrawSetShadow(loginbutton, 0);
1460 TextDrawAlignment(loginbutton, 1);
1461 TextDrawColor(loginbutton, -1);
1462 TextDrawBackgroundColor(loginbutton, 255);
1463 TextDrawBoxColor(loginbutton, 50);
1464 TextDrawUseBox(loginbutton, 1);
1465 TextDrawSetProportional(loginbutton, 1);
1466 TextDrawSetSelectable(loginbutton, 1);
1467
1468 registerbutton = TextDrawCreate(162.000000, 269.000000, "mdl-1000:registerbutton");
1469 TextDrawFont(registerbutton, 4);
1470 TextDrawLetterSize(registerbutton, 0.600000, 2.000000);
1471 TextDrawTextSize(registerbutton, 128.000000, 91.500000);
1472 TextDrawSetOutline(registerbutton, 1);
1473 TextDrawSetShadow(registerbutton, 0);
1474 TextDrawAlignment(registerbutton, 1);
1475 TextDrawColor(registerbutton, -1);
1476 TextDrawBackgroundColor(registerbutton, 255);
1477 TextDrawBoxColor(registerbutton, 50);
1478 TextDrawUseBox(registerbutton, 1);
1479 TextDrawSetProportional(registerbutton, 1);
1480 TextDrawSetSelectable(registerbutton, 1);
1481
1482 czas = TextDrawCreate(583.000000, 20.000000, "00:00");
1483 TextDrawFont(czas, 2);
1484 TextDrawLetterSize(czas, 0.554166, 2.449999);
1485 TextDrawTextSize(czas, 400.000000, 17.000000);
1486 TextDrawSetOutline(czas, 2);
1487 TextDrawSetShadow(czas, 0);
1488 TextDrawAlignment(czas, 2);
1489 TextDrawColor(czas, -1);
1490 TextDrawBackgroundColor(czas, 255);
1491 TextDrawBoxColor(czas, 50);
1492 TextDrawUseBox(czas, 0);
1493 TextDrawSetProportional(czas, 1);
1494 TextDrawSetSelectable(czas, 0);
1495
1496 data = TextDrawCreate(335.000000, 3.000000, "00/00/0000");
1497 TextDrawFont(data, 1);
1498 TextDrawLetterSize(data, 0.600000, 2.000000);
1499 TextDrawTextSize(data, 400.000000, 17.000000);
1500 TextDrawSetOutline(data, 1);
1501 TextDrawSetShadow(data, 0);
1502 TextDrawAlignment(data, 1);
1503 TextDrawColor(data, -1061109505);
1504 TextDrawBackgroundColor(data, 255);
1505 TextDrawBoxColor(data, 50);
1506 TextDrawUseBox(data, 0);
1507 TextDrawSetProportional(data, 1);
1508 TextDrawSetSelectable(data, 0);
1509
1510 Tday = TextDrawCreate(485.000000, 4.000000, "PON");
1511 TextDrawFont(Tday, 2);
1512 TextDrawLetterSize(Tday, 0.600000, 2.000000);
1513 TextDrawTextSize(Tday, 400.000000, 17.000000);
1514 TextDrawSetOutline(Tday, 1);
1515 TextDrawSetShadow(Tday, 0);
1516 TextDrawAlignment(Tday, 1);
1517 TextDrawColor(Tday, -2016478465);
1518 TextDrawBackgroundColor(Tday, 255);
1519 TextDrawBoxColor(Tday, 50);
1520 TextDrawUseBox(Tday, 0);
1521 TextDrawSetProportional(Tday, 1);
1522 TextDrawSetSelectable(Tday, 0);
1523
1524 Belt[0] = TextDrawCreate(642.000000, 442.000000, "_");
1525 TextDrawBackgroundColor(Belt[0], 255);
1526 TextDrawFont(Belt[0], 1);
1527 TextDrawLetterSize(Belt[0], 0.500000, 0.500000);
1528 TextDrawColor(Belt[0], -1);
1529 TextDrawSetOutline(Belt[0], 0);
1530 TextDrawSetProportional(Belt[0], 1);
1531 TextDrawSetShadow(Belt[0], 1);
1532 TextDrawUseBox(Belt[0], 1);
1533 TextDrawBoxColor(Belt[0], 255);
1534 TextDrawTextSize(Belt[0], -2.000000, -3.000000);
1535
1536 Belt[1] = TextDrawCreate(642.000000, 434.000000, "_");
1537 TextDrawBackgroundColor(Belt[1], 255);
1538 TextDrawFont(Belt[1], 1);
1539 TextDrawLetterSize(Belt[1], 0.500000, 0.500000);
1540 TextDrawColor(Belt[1], -1);
1541 TextDrawSetOutline(Belt[1], 0);
1542 TextDrawSetProportional(Belt[1], 1);
1543 TextDrawSetShadow(Belt[1], 1);
1544 TextDrawUseBox(Belt[1], 1);
1545 TextDrawBoxColor(Belt[1], 572661616);
1546 TextDrawTextSize(Belt[1], -2.000000, -3.000000);
1547
1548 Textura[0] = TextDrawCreate(290.000000, 415.000000, "LD_POKE:cd9s");
1549 TextDrawBackgroundColor(Textura[0], 255);
1550 TextDrawFont(Textura[0], 4);
1551 TextDrawLetterSize(Textura[0], 0.500000, 1.000000);
1552 TextDrawColor(Textura[0], 64);
1553 TextDrawSetOutline(Textura[0], 0);
1554 TextDrawSetProportional(Textura[0], 1);
1555 TextDrawSetShadow(Textura[0], 1);
1556 TextDrawUseBox(Textura[0], 1);
1557 TextDrawBoxColor(Textura[0], 255);
1558 TextDrawTextSize(Textura[0], 62.000000, 99.000000);
1559
1560 Textura[1] = TextDrawCreate(293.000000, 418.000000, "ld_grav:timer");
1561 TextDrawBackgroundColor(Textura[1], 255);
1562 TextDrawFont(Textura[1], 4);
1563 TextDrawLetterSize(Textura[1], 0.500000, 1.000000);
1564 TextDrawColor(Textura[1], -1);
1565 TextDrawSetOutline(Textura[1], 0);
1566 TextDrawSetProportional(Textura[1], 1);
1567 TextDrawSetShadow(Textura[1], 1);
1568 TextDrawUseBox(Textura[1], 1);
1569 TextDrawBoxColor(Textura[1], 255);
1570 TextDrawTextSize(Textura[1], 10.000000, 11.000000);
1571
1572 Belt[2] = TextDrawCreate(642.000000, 434.000000, "_");
1573 TextDrawBackgroundColor(Belt[2], 255);
1574 TextDrawFont(Belt[2], 1);
1575 TextDrawLetterSize(Belt[2], 0.500000, -0.299997);
1576 TextDrawColor(Belt[2], -1);
1577 TextDrawSetOutline(Belt[2], 0);
1578 TextDrawSetProportional(Belt[2], 1);
1579 TextDrawSetShadow(Belt[2], 1);
1580 TextDrawUseBox(Belt[2], 1);
1581 TextDrawBoxColor(Belt[2], 255);
1582 TextDrawTextSize(Belt[2], -2.000000, -1.000000);
1583
1584 UrlWeb = TextDrawCreate(6.000000, 434.000000, "NAZWA_SERWERA");
1585 TextDrawBackgroundColor(UrlWeb, 255);
1586 TextDrawFont(UrlWeb, 1);
1587 TextDrawLetterSize(UrlWeb, 0.260000, 1.200000);
1588 TextDrawColor(UrlWeb, -1);
1589 TextDrawSetOutline(UrlWeb, 0);
1590 TextDrawSetProportional(UrlWeb, 1);
1591 TextDrawSetShadow(UrlWeb, 1);
1592
1593 Date = TextDrawCreate(115.000000, 436.000000, "06/07/2013~y~r");
1594 TextDrawBackgroundColor(Date, 255);
1595 TextDrawFont(Date, 1);
1596 TextDrawLetterSize(Date, 0.210000, 1.000000);
1597 TextDrawColor(Date, -1);
1598 TextDrawSetOutline(Date, 0);
1599 TextDrawSetProportional(Date, 1);
1600 TextDrawSetShadow(Date, 1);
1601
1602 Online = TextDrawCreate(538.000000, 436.000000, "Online: ~y~2 ~w~graczy");
1603 TextDrawBackgroundColor(Online, 255);
1604 TextDrawFont(Online, 1);
1605 TextDrawLetterSize(Online, 0.240000, 0.899999);
1606 TextDrawColor(Online, -1);
1607 TextDrawSetOutline(Online, 0);
1608 TextDrawSetProportional(Online, 1);
1609 TextDrawSetShadow(Online, 1);
1610
1611 Belt[3] = TextDrawCreate(206.000000, 434.000000, "_");
1612 TextDrawBackgroundColor(Belt[3], 255);
1613 TextDrawFont(Belt[3], 1);
1614 TextDrawLetterSize(Belt[3], 0.340000, 1.600001);
1615 TextDrawColor(Belt[3], -1);
1616 TextDrawSetOutline(Belt[3], 0);
1617 TextDrawSetProportional(Belt[3], 1);
1618 TextDrawSetShadow(Belt[3], 1);
1619 TextDrawUseBox(Belt[3], 1);
1620 TextDrawBoxColor(Belt[3], -219);
1621 TextDrawTextSize(Belt[3], 199.000000, -40.000000);
1622
1623 Belt[4] = TextDrawCreate(422.000000, 434.000000, "_");
1624 TextDrawBackgroundColor(Belt[4], 255);
1625 TextDrawFont(Belt[4], 1);
1626 TextDrawLetterSize(Belt[4], 0.340000, 1.600001);
1627 TextDrawColor(Belt[4], -1);
1628 TextDrawSetOutline(Belt[4], 0);
1629 TextDrawSetProportional(Belt[4], 1);
1630 TextDrawSetShadow(Belt[4], 1);
1631 TextDrawUseBox(Belt[4], 1);
1632 TextDrawBoxColor(Belt[4], -219);
1633 TextDrawTextSize(Belt[4], 415.000000, -40.000000);
1634
1635 Belt[5] = TextDrawCreate(518.000000, 434.000000, "_");
1636 TextDrawBackgroundColor(Belt[5], 255);
1637 TextDrawFont(Belt[5], 1);
1638 TextDrawLetterSize(Belt[5], 0.340000, 1.600001);
1639 TextDrawColor(Belt[5], -1);
1640 TextDrawSetOutline(Belt[5], 0);
1641 TextDrawSetProportional(Belt[5], 1);
1642 TextDrawSetShadow(Belt[5], 1);
1643 TextDrawUseBox(Belt[5], 1);
1644 TextDrawBoxColor(Belt[5], -219);
1645 TextDrawTextSize(Belt[5], 511.000000, -40.000000);
1646
1647
1648 return 1;
1649}