25.05.2014, 18:41
Functions:
gates be close and open automatically with a timer, money bag in area 51, if you take MB pickup, it destroy automatically and give money and allert players online to kill he for take his money. if you want open or close gates or spawn the MB manually use /a51gateshelp
includes:
-a_samp
-streamer (By Incognito)
Colors define:
Value system define
Pawn code:
Download FS:
Pastebin
Mediafire .pwn & .amx
Mediafire .pwn
Mediafire .amx
PS: The text are in italian, but i've comment in english
PSS: sorry for my bed english, i'm italian
gates be close and open automatically with a timer, money bag in area 51, if you take MB pickup, it destroy automatically and give money and allert players online to kill he for take his money. if you want open or close gates or spawn the MB manually use /a51gateshelp
includes:
-a_samp
-streamer (By Incognito)
Colors define:
Код:
#define COLOR_RED 0xFF0000FF #define COLOR_BLUE 0x0004FFFF #define COLOR_GREEN 0x00FF55FF #define COLOR_YELLOW 0xEAFF00FF #define COLOR_ORANGE 0xFFB300FF #define COLOR_BLACK 0x000000FF #define COLOR_WHITE 0xFFFFFFFF
Код:
#define a51_c_timer 300000 //ms timer to close a51 (standard 300000 milliseconds (5 minutes)) #define a51_o_timer 600000 //ms timer to open a51 (standard 600000 milliseconds (10 minutes)) #define a51_MB_timer 1800000 //ms timer to respawn money bag on area 51 (standard 1800000 milliseconds (30 minutes)) #define a51_MB_surviveT 1800000 //ms timer to survive with area 51's Money Bag (standard 30000 milliseconds (5 minutes)) #define a51_MB_money 1000 //money bag's money (standard 1000 $)
Код:
//area 51 open, close and money bag simple system by [M3]DarK_FeneR #include <a_samp> #include <streamer> #define COLOR_RED 0xFF0000FF #define COLOR_BLUE 0x0004FFFF #define COLOR_GREEN 0x00FF55FF #define COLOR_YELLOW 0xEAFF00FF #define COLOR_ORANGE 0xFFB300FF #define COLOR_BLACK 0x000000FF #define COLOR_WHITE 0xFFFFFFFF #define a51_c_timer 300000 //ms timer to close a51 (standard 300000 milliseconds (5 minutes)) #define a51_o_timer 600000 //ms timer to open a51 (standard 600000 milliseconds (10 minutes)) #define a51_MB_timer 1800000 //ms timer to respawn money bag on area 51 (standard 1800000 milliseconds (30 minutes)) #define a51_MB_surviveT 1800000 //ms timer to survive with area 51's Money Bag (standard 30000 milliseconds (5 minutes)) #define a51_MB_money 1000 //money bag's money (standard 1000 $) #define FILTERSCRIPT new a_gate, b_gate, c_gate, d_gate, e_gate, a51_MB, a51_MB_icon; new a51_haveMB[MAX_PLAYERS]; #if defined FILTERSCRIPT main() { } public OnFilterScriptInit() { //aperto all'avvio a_gate = CreateDynamicObject(3095,277.3400000,1884.1000000,16.0800000,0.0000000,0.0000000,0.0000000); b_gate = CreateDynamicObject(3117,226.5000000,1859.2000000,11.6000000,0.0000000,90.0000000,0.0000000); c_gate = CreateDynamicObject(2951,220.7200000,1875.9000000,15.7000000,0.0000000,180.0000000,0.0000000); d_gate = CreateDynamicObject(2951,207.1000100,1875.9000000,15.7000000,0.0000000,180.0000000,0.0000000); e_gate = CreateDynamicObject(2928,237.2599900,1863.0000000,14.3000000,0.0000000,0.0000000,0.0000000); GameTextForAll("~g~Area 51 Aperta!",5000,1); //send game text for all when load FS SetTimer("a51_chiusa",a51_c_timer,0); a51_MB = CreatePickup(1550, 2, 268.6483, 1883.7699, -30.0938, -1); return 1; } public OnFilterScriptExit() { DestroyDynamicObject(a_gate); //delete gate a DestroyDynamicObject(b_gate); //delete gate b DestroyDynamicObject(c_gate); //delete gate c DestroyDynamicObject(d_gate); //delete gate d DestroyDynamicObject(e_gate); //delete gate e when unload FS return 1; } public OnPlayerConnect(playerid) { SetPlayerMapIcon(playerid, a51_MB_icon, 268.6483, 1883.7699, -30.0938, 52, 2, 0); //set map icon a51_haveMB[playerid] = 0; return 1; } public OnPlayerDeath(playerid, killerid, reason) { if(a51_haveMB[playerid] == 1) //if you have Money bag { if(killerid!=INVALID_PLAYER_ID) //if reason isn't sucicided { GivePlayerMoney(killerid, a51_MB_money); new str[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(str, sizeof(str), "[AREA51]%s и STATO UCCISO! %s ha ora i soldi dell'area 51", name, killerid); SendClientMessageToAll(COLOR_RED, str); } else { new str[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(str, sizeof(str), "[AREA51]%s и MORTO e ha perso i soldi dell'area 51", name); SendClientMessageToAll(COLOR_RED, str); } a51_haveMB[playerid] = 0; GivePlayerMoney(playerid, -a51_MB_money); } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/a51o", true)) //area 51 gates opened { if(IsPlayerAdmin(playerid)) { SetTimer("a51_aperta",1,0); new str[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(str, sizeof(str), "[AREA51]%s ha aperto l'Area 51", name); SendClientMessageToAll(COLOR_GREEN, str); } else { SendClientMessage(playerid, COLOR_RED, "[AREA51]Non sei RCon Admin!"); } return 1; } if(!strcmp(cmdtext, "/a51c", true)) //area 51 gates closed { if(IsPlayerAdmin(playerid)) { SetTimer("a51_chiusa",1,0); new str[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(str, sizeof(str), "[AREA51]%s ha chiuso l'Area 51", name); SendClientMessageToAll(COLOR_GREEN, str); } else { SendClientMessage(playerid, COLOR_RED, "[AREA51]Non sei RCon Admin!"); } return 1; } if(!strcmp(cmdtext, "/a51mb", true)) //area 51 MB spawn { if(IsPlayerAdmin(playerid)) { SetTimer("a51_MB_spawn",1,0); new str[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(str, sizeof(str), "[AREA51]%s ha fatto spawnare la borsa dei soldi", name); SendClientMessageToAll(COLOR_RED, str); } else { SendClientMessage(playerid, COLOR_RED, "[AREA51]Non sei RCon Admin!"); } return 1; } if(!strcmp(cmdtext, "/a51gateshelp", true)) //area 51 MB spawned { if(IsPlayerAdmin(playerid)) { SendClientMessage(playerid, COLOR_YELLOW, "/a51o ---> Apre l'Area 51"); //open area 51 manually SendClientMessage(playerid, COLOR_YELLOW, "/a51c ---> Chiude l'Area 51"); //close area 51 manually SendClientMessage(playerid, COLOR_YELLOW, "/a51mb ---> Spawna la borsa dei soldi"); //respawn MB manually } return 1; } return 0; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == a51_MB) //when pick up a51 Money bag { new str[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(str, sizeof(str), "[AREA51]%s ha rubato 10000$ dall'area 51! Uccidetelo per prendergli i soldi!", name); //text for all take Money bag SendClientMessageToAll(COLOR_RED,str); SendClientMessage(playerid, COLOR_YELLOW, "[AREA51]Hai rubato 10000$ dall'Area 51 Conservali prima che ti uccidano!"); // Message received money to playerid GivePlayerMoney(playerid, a51_MB_money); //give playerid money DestroyPickup(a51_MB); //destroy a51 MB pickup RemovePlayerMapIcon(playerid, a51_MB_icon); //remove player a51's money bag SetTimer("a51_MB_spawn",a51_MB_timer,0); //timer to respawn Money bag a51_haveMB[playerid] = 1; //set you on: have got money bag SetTimer("survive_with_MB", a51_MB_surviveT,0); //timer to survive with money bag } return 1; } forward a51_chiusa(); //close area 51 public a51_chiusa() { MoveDynamicObject (a_gate,268.7000100,1884.1000000,16.0800000,1); MoveDynamicObject (b_gate,226.5000000,1859.2000000,13.8400000,1); MoveDynamicObject (c_gate,216.7000000,1875.9000000,15.7000000,1); MoveDynamicObject (d_gate,211.1000100,1875.9000000,15.7000000,1); MoveDynamicObject (e_gate,239.5000000,1863.0000000,14.3000000,1); GameTextForAll("~r~Area 51 Chiusa!",5000,1); //text a51 closed SetTimer("a51_aperta",a51_o_timer,0); } forward a51_aperta(); //open area 51 public a51_aperta() { MoveDynamicObject (a_gate,277.3400000,1884.1000000,16.0800000,1); MoveDynamicObject (b_gate,226.5000000,1859.2000000,11.6000000,1); MoveDynamicObject (c_gate,220.7200000,1875.9000000,15.7000000,1); MoveDynamicObject (d_gate,207.1000100,1875.9000000,15.7000000,1); MoveDynamicObject (e_gate,237.2599900,1863.0000000,14.3000000,1); GameTextForAll("~g~Area 51 Aperta!",5000,1); //text a51 opened SetTimer("a51_chiusa",a51_c_timer,0); } forward a51_MB_spawn(playerid); //respawn Money bag public a51_MB_spawn(playerid) { a51_MB = CreatePickup(1550, 2, 268.6483, 1883.7699, -30.0938, -1); SetPlayerMapIcon(playerid, a51_MB_icon, 268.6483, 1883.7699, -30.0938, 52, 0, 0); new str[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(str, sizeof(str), "[AREA51]La borsa dei soldi da 10000$ nell'Area 51 и ora disponibile!", name); //text to all money bag are now avaible SendClientMessageToAll(COLOR_RED,str); } forward survive_with_MB(playerid); //survive with Money bag public survive_with_MB(playerid) { if(a51_haveMB[playerid] == 1) //if you have got Money Bag { a51_haveMB[playerid] = 0; //now you haven't got money bag SendClientMessage(playerid, COLOR_YELLOW, "[AREA51]Sei sopravvissuto con i soldi, Complimenti!"); } } #endif
Pastebin
Mediafire .pwn & .amx
Mediafire .pwn
Mediafire .amx
PS: The text are in italian, but i've comment in english
PSS: sorry for my bed english, i'm italian