Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_BLUE 0x2641FEAA
- #define COLOR_1GREEN 0x6BD700FF
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_1BLUE 0x0080FFFF
- #define PTP PlayerToPoint
- forward CustomPickups();
- forward vamaClose(playerid);
- forward vama1Close(playerid);
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- enum pInfo
- {
- pKey[128],
- pPassport,
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new vama;
- new vama1;
- new pickupvama;
- new pickupvama1;
- public OnGameModeInit()
- {
- pickupvama = CreatePickup(1239, 23, 600.9317,-1184.7410,20.7388);
- pickupvama1 = CreatePickup(1239, 23, 628.9692,-1188.7152,18.5387);
- CreateObject(3749, 625.39691162109, -1182.8270263672, 23.350332260132, 0, 0, 30.304809570313);
- CreateObject(3749, 605.58813476563, -1192.4547119141, 23.322856903076, 0, 0, 26.226318359375);
- CreateObject(1251, 633.84332275391, -1191.6301269531, 17.214059829712, 0, 0, 295.41516113281);
- CreateObject(1251, 595.78009033203, -1182.0657958984, 20.57836151123, 0, 0, 298.44250488281);
- CreateObject(1251, 600.64013671875, -1179.4423828125, 20.578256607056, 0, 0, 298.19091796875);
- CreateObject(1251, 628.77862548828, -1194.052734375, 17.221609115601, 0, 0, 295.41137695313);
- CreateObject(3877, 632.08703613281, -1183.1007080078, 19.817638397217, 0, 0, 31.759765625);
- CreateObject(3877, 638.46960449219, -1191.9929199219, 19.071990966797, 0, 0, 55.575805664063);
- CreateObject(3877, 622.25555419922, -1188.4450683594, 19.840782165527, 0, 0, 27.786010742188);
- CreateObject(3877, 626.23864746094, -1198.5509033203, 19.071990966797, 0, 0, 69.469177246094);
- CreateObject(3877, 617.78784179688, -1201.5134277344, 19.071990966797, 0, 0, 47.635864257813);
- CreateObject(3877, 611.90734863281, -1192.7907714844, 19.952568054199, 0, 0, 27.781311035156);
- CreateObject(3877, 605.58874511719, -1206.1070556641, 19.071990966797, 0, 0, 61.523742675781);
- CreateObject(3877, 602.46435546875, -1197.4226074219, 19.908348083496, 0, 0, 31.744995117188);
- CreateObject(3472, 622.81066894531, -1200.9226074219, 17.40625, 0, 0, 294.22521972656);
- CreateObject(9833, 622.28393554688, -1200.8806152344, 14.233810424805, 0, 0, 348);
- CreateObject(715, 642.90087890625, -1191.4497070313, 25.738817214966, 0, 0, 342.13513183594);
- CreateObject(715, 601.88415527344, -1208.41015625, 25.698572158813, 0, 0, 0);
- CreateObject(705, 661.59259033203, -1213.5278320313, 16.449003219604, 0, 0, 0);
- CreateObject(669, 621.9755859375, -1198.6732177734, 17.40625, 0, 0, 13.894958496094);
- CreateObject(3660, 625.66278076172, -1171.4774169922, 22.183000564575, 0.25, 353.75, 121.03497314453);
- CreateObject(3660, 615.08734130859, -1158.0017089844, 24.124618530273, 0.2471923828125, 353.74877929688, 135.94079589844);
- CreateObject(3660, 614.35662841797, -1177.5161132813, 22.422786712646, 0.2471923828125, 353.74877929688, 123.77941894531);
- CreateObject(3660, 602.18145751953, -1163.2585449219, 24.498796463013, 0.2471923828125, 353.74877929688, 137.67242431641);
- CreateObject(3660, 605.02807617188, -1180.7502441406, 22.793039321899, 0.2471923828125, 351.74877929688, 125.54443359375);
- CreateObject(3660, 594.56042480469, -1168.9376220703, 24.864562988281, 0.2471923828125, 352.74877929688, 135.46594238281);
- CreateObject(3660, 593.62567138672, -1187.4162597656, 22.898826599121, 0.2471923828125, 351.24877929688, 129.49139404297);
- CreateObject(3660, 580.80096435547, -1173.4898681641, 25.832664489746, 0.2471923828125, 351.24877929688, 136.16540527344);
- CreateObject(1215, 588.16790771484, -1163.3665771484, 25.106649398804, 0, 0, 0);
- CreateObject(1294, 623.37347412109, -1170.8477783203, 22.762279510498, 0, 0, 13.894897460938);
- CreateObject(1294, 617.38708496094, -1177.6828613281, 23.197828292847, 0, 0, 214.2822265625);
- CreateObject(3877, 558.70397949219, -1157.3256835938, 28.377729415894, 0, 0, 67.478454589844);
- CreateObject(3877, 562.17388916016, -1146.572265625, 28.589426040649, 0, 0, 63.508056640625);
- CreateObject(3877, 572.15643310547, -1164.1782226563, 26.610498428345, 0, 0, 49.611572265625);
- CreateObject(3877, 580.95910644531, -1156.5821533203, 26.273616790771, 0, 0, 45.638763427734);
- CreateObject(1215, 595.11358642578, -1170.3778076172, 23.851566314697, 0, 0, 0);
- CreateObject(1215, 602.19396972656, -1178.3306884766, 21.036600112915, 0, 0, 0);
- CreateObject(1215, 593.15588378906, -1183.0465087891, 21.296489715576, 0, 0, 0);
- CreateObject(1215, 586.88494873047, -1177.9224853516, 23.837886810303, 0, 0, 0);
- CreateObject(1215, 579.375, -1170.6208496094, 25.44997215271, 0, 0, 0);
- CreateObject(3877, 581.26165771484, -1130.7436523438, 26.819944381714, 0, 0, 67.47802734375);
- CreateObject(3877, 574.80950927734, -1140.1143798828, 26.867233276367, 0, 0, 67.47802734375);
- CreateObject(3877, 595.82586669922, -1140.07421875, 25.711242675781, 0, 0, 45.643188476563);
- CreateObject(3877, 588.06848144531, -1148.4344482422, 25.758623123169, 0, 0, 45.642700195313);
- CreateObject(1294, 605.47338867188, -1184.0454101563, 23.163106918335, 0, 0, 13.892211914063);
- CreateObject(1294, 598.26538085938, -1189.2760009766, 23.133031845093, 0, 0, 208.37231445313);
- CreateObject(1215, 626.38201904297, -1194.978515625, 17.970573425293, 0, 0, 0);
- CreateObject(1215, 636.06402587891, -1190.5051269531, 17.970573425293, 0, 0, 0);
- CreateObject(1215, 617.54077148438, -1161.0480957031, 22.867336273193, 0, 0, 0);
- CreateObject(1215, 609.90087890625, -1169.1381835938, 22.618650436401, 0, 0, 0);
- CreateObject(1215, 610.99615478516, -1154.5511474609, 23.876905441284, 0, 0, 0);
- CreateObject(1215, 603.10455322266, -1162.9630126953, 23.60803604126, 0, 0, 0);
- CreateObject(1215, 595.66571044922, -1155.9907226563, 24.724115371704, 0, 0, 0);
- CreateObject(1215, 606.59753417969, -1149.5048828125, 23.240802764893, 0, 0, 0);
- vama = CreateObject(980, 625.47351074219, -1182.7917480469, 20.525373458862, 0, 0, 209.08020019531);
- vama1 = CreateObject(980, 604.86401367188, -1191.7984619141, 20.784515380859, 0, 0, 28.615447998047);
- return 1;
- }
- public OnFilterScriptInit()
- {
- return 1;
- }
- public vamaClose()
- {
- MoveObject(vama, 625.47351074219, -1182.7917480469, 20.525373458862, 3.5);
- return 1;
- }
- public vama1Close()
- {
- MoveObject(vama1, 604.86401367188, -1191.7984619141, 20.784515380859, 3.5);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- //------------------------------------Barrier--------------------------------------
- if(strcmp(cmdtext, "/barriera", true) == 0)
- {
- if(PlayerToPoint(3.0, playerid, 600.9317,-1184.7410,20.7388))
- {
- if(PlayerInfo[playerid][pPassport] == 1)
- {
- MoveObject(vama1, 604.86401367188, -1191.7984619141, 25.759492874146, 5.5);
- SetTimer("vama1Close", 3000, 0);
- SendClientMessage(playerid, COLOR_1GREEN, "Ai platit vamei 100$ pentru a putea trece..Vama se va inchide in 3 secunde");
- GivePlayerMoney(playerid,-100);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "* You don't have an Passport, go in the City Hall and buy one.");
- return 1;
- }
- }
- else if(PlayerToPoint(5.0, playerid, 628.9692,-1188.7152,18.5387))
- {
- if(PlayerInfo[playerid][pPassport] == 1)
- {
- MoveObject(vama, 625.47351074219, -1182.7917480469, 25.80029296875, 5.5);
- SetTimer("vamaClose", 3000, 0);
- SendClientMessage(playerid, COLOR_1GREEN, "Ai platit vamei 100$ pentru a putea trece..Vama se va inchide in 3 secunde");
- GivePlayerMoney(playerid,-100);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "* You don't have an Passport, go in the City Hall and buy one.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "You are not at Barrier.");
- return 1;
- }
- }
- return 0;
- }
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
- public OnPlayerConnect(playerid)
- {
- PlayerInfo[playerid][pPassport] = 1;
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == pickupvama)
- {
- GameTextForPlayer(playerid,"~w~Scrie ~r~/barriera ~w~pentru a deskide barriera",3000,5);
- }
- if(pickupid == pickupvama1)
- {
- GameTextForPlayer(playerid,"~w~Scrie ~r~/barriera ~w~pentru a deskide barriera",3000,5);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement