Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #include zcmd
- #include <Streamer>
- #include foreach
- #define GUNGAME 0xD86EFFFF
- #define GUNGAME_ "{E0B6F0}"
- #define WHITE 0xFFFFFFFF
- #define GREEN 0x255F17FF
- #define GRAY 0xBEBEBEFF
- #define RED 0xE62525FF
- #define RED2_ "{9E1010}"
- #define RED2 0x9E1010FF
- #define LIGHTRED 0xFF975EFF
- #define YELLOW 0xFFA600FF
- #define YELLOW2 0xFF3C00FF
- #define YELLOW3 0xFF5500FF
- //format(str,sizeof(str),"Teleport - "YELLOW_"%s has teleported to San Fierro "YELLOW3_"(/sf)",pName[playerid]);
- #define YELLOW_ "{FFA600}"
- #define YELLOW2_ "{FF3C00}"
- #define YELLOW3_ "{FF5500}"
- #define DmCol1 0x419E28FF
- #define DmCol1_ "{419E28}"
- #define DmCol2 0x70AB5CFF
- #define DmCol2_ "{70AB5C}"
- #define DmCol3 0xB7FF00FF
- #define DmCol3_ "{B7FF00}"
- #define JOBINFO 0xC8F1FAFF
- #define BLUE 0x168BFFFF
- #define DARKORANGE 0xC03A00FF
- #define ORANGE 0xFF9200FF
- #define BLUE2 0x001F6AFF //dark blue
- #define LIME 0x9DFF00FF
- #define PURPLE 0xB10F4EFF
- #define SKIN 0xFFA863FF
- #define SKIN2 0xB77259FF
- #define LIGHTYELLOW 0xFFFF6DFF
- #define PINK 0xEB1CC1FF
- #define WOOD 0x8B5A2BFF
- #define GREENBLUE 0x1FC4A6FF
- #define LIGHTBLUE 0x00E5EEFF
- #define DARKBLUE 0x0040FFFF
- #define BLACK 0x7A7A7AFF
- #define DOOM 0xF4A460FF
- //#define AdminInfo 0x02EBB8FF
- #define AdminInfo 0x00D799FF
- #define RACE 0x46E01BFF
- #define LIME_ "{9DFF00}"
- #define DOOM_ "{F4A460}"
- #define WHITE_ "{FFFFFF}"
- #define RED_ "{E62525}"
- #define LIGHTRED_ "{FF975E}"
- #define JOBINFO_ "{C8F1FA}"
- #define BLUE_ "{168BFF}"
- #define DARK_ORANGE "{C03A00}"
- #define ORANGE_ "{FF9200}"
- #define BLUE2_ "{001F6A}"
- #define PURPLE_ "{B50D61}"
- #define SKIN_ "{FFA863}"
- #define SKIN2_ "{B77259}"
- #define LIGHTYELLOW_ "{FFFF6D}"
- #define PINK_ "{EB1CC1}"
- #define WOOD_ "{8B5A2B}"
- #define GREENBLUE_ "{1FC4A6}"
- #define GREEN_ "{255F17}"
- #define GRAY_ "{BEBEBE}"
- #define LIGHTBLUE_ "{00E5EE}"
- #define DARKBLUE_ "{0040FF}"
- #define BLACK_ "{7A7A7A}"
- #define AdminInfo_ "{00D799}"
- #define RACE_ "{46E01B}"
- #define cornsilk 0xFFED83AA
- #define lime 0x9CD13FFF
- #define gray 0x9C9C9CAA
- #define warning 0xFF0000FF
- #define coolblue 0x009DFFAA
- #define orange 0xDB9428AA
- #define lblue 0xADDEFFFF
- #define CWCOL1 0xFF6A00FF
- #define CWCOL2 0xFFA666FF
- #define cornsilk2 "{FBDF89}"
- #define lime2 "{9CD13F}"
- #define g2 "{9C9C9C}"
- #define orange2 "{DB9428}"
- #define cb2 "{009DFF}"
- #define lblue2 "{ADDEFF}"
- #define warning2 "{FF0000}"
- #define CWCOL1_ "{FF6A00}"
- #define CWCOL2_ "{FFA666}"
- new xMasPickUp[6];
- new Party;
- new ShipPartyCount;
- new Float:partyX,Float:partyY,Float:partyZ,partyVw;
- new Ship1,Ship2,Ship3;
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- #endif
- public OnGameModeInit()
- {
- for(new x=0; x<sizeof(xMasPickUp); x++) xMasPickUp[x]=-255;
- Ship1 = CreateObject(10793, -1604.04, 22.73, 35.57, 0.00, 0.00, 45.00);
- Ship2 = CreateObject(10794, -1550.83, 75.93, 7.00, 0.00, 0.00, 45.00);
- Ship3 = CreateObject(10795, -1552.314, 74.4206, 17.05, 0.00, 0.00, 45.00);
- AttachObjectToObject(Ship1, Ship2, -75.65, 0.0, 28.5, 0.0, 0.0, 0.0, 1);
- AttachObjectToObject(Ship2, Ship3, 2.8, 0, -10.0, 0.0, 0.0, 0.0, 1);
- return 1;
- }
- stock alvl(playerid)
- {
- return CallRemoteFunction("AdminLevel", "d", playerid);
- }
- forward resetship();
- public resetship()
- {
- SetObjectPos(Ship1,-1604.04, 22.73, 35.57);
- SetObjectPos(Ship2,-1550.83, 75.93, 7.00);
- SetObjectPos(Ship3,-1552.314, 74.4206, 17.05);
- SetObjectRot(Ship1,0.00, 0.00, 45.00);
- SetObjectRot(Ship2,0.00, 0.00, 45.00);
- SetObjectRot(Ship3,0.00, 0.00, 45.00);
- AttachObjectToObject(Ship1, Ship2, -75.65, 0.0, 28.5, 0.0, 0.0, 0.0, 1);
- AttachObjectToObject(Ship2, Ship3, 2.7, 0, -10.0, 0.0, 0.0, 0.0, 1);
- Party = 0;
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- CMD:startparty(playerid)
- {
- if(alvl(playerid) < 4) return 0;
- ShowPlayerDialog(playerid,4544,DIALOG_STYLE_LIST,"Start Party","1.Start a normal party in your position \n2.Start the THE TITANIC party\n3.xMas party","Start","Exit");
- return 1;
- }
- CMD:party(playerid)
- {
- if(Party == 0) return SendClientMessage(playerid,RED,"No party has been started yet");
- else if(Party == 2) return SendClientMessage(playerid,RED,"The party has already been started");
- else
- {
- switch(random(5))
- {
- case 0:SetPlayerPos(playerid,partyX,partyY,partyZ);
- case 1:SetPlayerPos(playerid,partyX+1,partyY,partyZ);
- case 2:SetPlayerPos(playerid,partyX,partyY+1,partyZ);
- case 3:SetPlayerPos(playerid,partyX-1,partyY,partyZ);
- case 4:SetPlayerPos(playerid,partyX,partyY-1,partyZ);
- }
- }
- SetPlayerVirtualWorld(playerid,partyVw);
- return 1;
- }
- new Float:Titanic1Coords[][6] = //93
- {
- {-1415.2278, 178.8590, 35.5700 , 0.0000, 0.0000, 45.0000},
- {-1046.8055, 545.8651, 35.5700, 0.0000, 0.0000, 45.0000},
- {-1068.0116, 597.9653, 35.5700, 0.0000, 0.0000, 0.0000},
- {-984.4982, 597.2338, 35.5700,0.0000, 0.0000, -14.0000},
- {-693.9249, 514.3314, 35.5700, 0.0000, 0.0000, -16.0000},
- {-343.6650, 386.5757, 35.5700,0.0000, 0.0000, -5.0000}, //start the shit
- {99.7249, 310.9523, 35.5700,0.0000, 0.0000, 10.0000},//crashed
- {115.8157, 276.7807, 35.5700,0.0000, 0.0000, 40.0000},
- {290.2462, 418.0674, 71.3000,0.0000, 50.0000, 40.0000},
- {290.2462, 418.0674, 29.9000,0.0000, 50.0000, 40.0000}
- };
- new Float:Titanic2Coords[][6] = //94
- {
- {-1361.5927, 232.4753, 7.0000, 0.0000, 0.0000, 45.0000},
- {-993.9478, 598.6451, 7.0000, 0.0000, 0.0000, 45.0000},
- {-993.3140, 597.5258, 7.0000, 0.0000, 0.0000, 0.0000},
- {-911.5853, 578.8046, 7.0000,0.0000, 0.0000, -14.0000},
- {-621.7428, 493.4192, 7.0000,0.0000, 0.0000, -16.0000},
- {-268.5040, 379.8922, 7.0000,0.0000, 0.0000, -5.0000}, //start the shit
- {174.1780, 324.1174, 7.0000,0.0000, 0.0000, 10.0000},//crashed
- {173.6760, 324.8739, 7.0000,0.0000, 0.0000, 40.0000},
- {313.2526, 437.4551, 1.0000,0.0000, 50.0000, 40.0000},
- {313.2526, 437.4551, -39.0000,0.0000, 50.0000, 40.0000}
- };
- new Float:Titanic3Coords[][6] = //95
- {
- {-1363.3668, 230.5191, 17.0500, 0.0000, 0.0000, 45.0000},
- {-995.2252, 597.4672, 17.0500, 0.0000, 0.0000, 45.0000},
- {-995.1288, 597.9356, 17.0500, 0.0000, 0.0000, 0.0000},
- {-913.5530, 579.4688, 17.0500,0.0000, 0.0000, -14.0000},
- {-624.0149, 494.0974, 17.0500,0.0000, 0.0000, -16.0000},
- {-270.9716, 380.1544, 17.0500, 0.0000, 0.0000, -5.0000}, // start the shit
- {171.8441, 323.7453, 17.0500,0.0000, 0.0000, 10.0000}, //crashed
- {171.8441, 323.7453, 17.0500,0.0000, 0.0000, 40.0000},
- {315.9788, 439.8584, 4.0000,0.0000, 50.0000, 40.0000},
- {315.9645, 439.8445, -37.0000,0.0000, 50.0000, 40.0000}
- };
- stock PlayerName(playerid)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- return pname;
- }
- CMD:endparty(playerid)
- {
- if(alvl(playerid) < 4) return 0;
- if((Party == 0)) return SendClientMessage(playerid,RED,"No party has been started yet");
- new str[75];
- format(str,sizeof(str),"%s has ended the party",PlayerName(playerid));
- SendClientMessageToAll(GREENBLUE,str);
- Party=0;
- for(new x=0; x<sizeof(xMasPickUp); x++) DestroyPickup(xMasPickUp[x]),xMasPickUp[x]=-255;
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- if(objectid == Ship2)
- {
- ShipPartyCount++;
- MoveObject(Ship1,Titanic1Coords[ShipPartyCount][0],Titanic1Coords[ShipPartyCount][1],Titanic1Coords[ShipPartyCount][2],10.00,Titanic1Coords[ShipPartyCount][3],Titanic1Coords[ShipPartyCount][4],Titanic1Coords[ShipPartyCount][5]);
- MoveObject(Ship2,Titanic2Coords[ShipPartyCount][0],Titanic2Coords[ShipPartyCount][1],Titanic2Coords[ShipPartyCount][2],10.00,Titanic2Coords[ShipPartyCount][3],Titanic2Coords[ShipPartyCount][4],Titanic2Coords[ShipPartyCount][5]);
- MoveObject(Ship3,Titanic3Coords[ShipPartyCount][0],Titanic3Coords[ShipPartyCount][1],Titanic3Coords[ShipPartyCount][2],10.00,Titanic3Coords[ShipPartyCount][3],Titanic3Coords[ShipPartyCount][4],Titanic3Coords[ShipPartyCount][5]);
- if(ShipPartyCount == 5)
- {
- new Float:x,Float:y,Float:z;
- GetObjectPos(Ship2,x,y,z);
- foreach(Player,playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid,100.00,x,y,z))
- {
- SetPlayerWeather(playerid ,16);
- SendClientMessage(playerid,RED,"the weather has started to change");
- }
- }
- }
- if(ShipPartyCount == 6)
- {
- new Float:x,Float:y,Float:z;
- GetObjectPos(Ship2,x,y,z);
- foreach(Player,playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid,100.00,x,y,z))
- {
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid,"http://dl.dropbox.com/u/52869044/Alarm%20Sound%20Navy.mp3");
- SendClientMessage(playerid,RED,"DANGER......The Ship Has Crashed ");
- }
- }
- }
- if(ShipPartyCount == 9)
- {
- SetTimer("resetship",10*1000,false);
- }
- }
- return 1;
- }
- forward moveship(playerid);
- public moveship(playerid)
- {
- SendClientMessageToAll(BLUE,"The titanic party has been started");
- MoveObject(Ship1,Titanic1Coords[0][0],Titanic1Coords[0][1],Titanic1Coords[0][2],5.00,Titanic1Coords[0][3],Titanic1Coords[0][4],Titanic1Coords[0][5]);
- MoveObject(Ship2,Titanic2Coords[0][0],Titanic2Coords[0][1],Titanic2Coords[0][2],5.00,Titanic2Coords[0][3],Titanic2Coords[0][4],Titanic2Coords[0][5]);
- MoveObject(Ship3,Titanic3Coords[0][0],Titanic3Coords[0][1],Titanic3Coords[0][2],5.00,Titanic3Coords[0][3],Titanic3Coords[0][4],Titanic3Coords[0][5]);
- ShipPartyCount = 1;
- Party = 2;
- new Float:x,Float:y,Float:z;
- GetObjectPos(Ship2,x,y,z);
- foreach(Player,playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid,100.00,x,y,z))
- {
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid,"http://dl.dropbox.com/u/52869044/Server%20Songs/Titanic%20remix%20THE%20BEST%20EVER%21.mp3");
- }
- }
- }
- stock StartShipParty(playerid)
- {
- new str[128];
- format(str,sizeof(str),"%s has started "BLUE_"THE TITANIC"LIGHTBLUE_" party",PlayerName(playerid));
- SendClientMessageToAll(LIGHTBLUE,str);
- SendClientMessageToAll(GREENBLUE,"The ship will move in 30 seconds, type "PINK_"(/party)"GREENBLUE_" to join" );
- SetTimer("moveship",30*1000,false);
- if(IsValidObject(Ship1))DestroyObject(Ship1);
- if(IsValidObject(Ship2))DestroyObject(Ship2);
- if(IsValidObject(Ship3))DestroyObject(Ship3);
- Ship1 = CreateObject(10793, -1604.04, 22.73, 35.57, 0.00, 0.00, 45.00);
- Ship2 = CreateObject(10794, -1550.83, 75.93, 7.00, 0.00, 0.00, 45.00);
- Ship3 = CreateObject(10795, -1552.314, 74.4206, 17.05, 0.00, 0.00, 45.00);
- AttachObjectToObject(Ship1, Ship2, -75.65, 0.0, 28.5, 0.0, 0.0, 0.0, 1);
- AttachObjectToObject(Ship2, Ship3, 2.7, 0, -10.0, 0.0, 0.0, 0.0, 1);
- }
- stock StartxMasParty(playerid)
- {
- new str[128];
- format(str,sizeof(str),"%s has started the"BLUE_" xMas"LIGHTBLUE_" party",PlayerName(playerid));
- SendClientMessageToAll(LIGHTBLUE,str);
- xMasPickUp[0] = CreateDynamicObject(19057, 972.8822,-2483.4968,70.5924,0.0,0.0,0.0,0);
- xMasPickUp[1] = CreateDynamicObject(19057, 981.8885,-2495.0662,70.7624,0.0,0.0,0.0,0);
- xMasPickUp[2] = CreateDynamicObject(19056, 973.0527,-2510.1470,70.8676,0.0,0.0,0.0,0);
- xMasPickUp[3] = CreateDynamicObject(19058, 961.7491,-2507.1165,70.8982,0.0,0.0,0.0,0);
- xMasPickUp[4] = CreateDynamicObject(19055, 955.5288,-2497.6960,70.2119,0.0,0.0,0.0,0);
- xMasPickUp[5] = CreateDynamicObject(19055, 962.6249,-2495.0610,70.2687,0.0,0.0,0.0,0);
- for(new i=0;i<6;i++)
- {
- new Float:x,Float:y,Float:z;
- GetDynamicObjectPos(xMasPickUp[i],x,y,z);
- MoveDynamicObject(xMasPickUp[i],x,y,55.0,2.00);
- }
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- for(new x=0;x<6;x++)
- {
- if(pickupid ==xMasPickUp[x])
- {
- switch(random(5))
- {
- case 0:
- {
- GivePlayerMoney(playerid,50000);
- }
- case 1:
- {
- GameTextForPlayer(playerid,"~b~Santa Hat",1000, 0);
- SetPlayerAttachedObject(playerid, 2, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
- }
- case 2:
- {
- GivePlayerWeapon(playerid, 16, 64);
- GameTextForPlayer(playerid,"~r~BOMB",1000, 0);
- }
- case 3:
- {
- GameTextForPlayer(playerid,"~p~Dildo",1000, 0);
- SetPlayerAttachedObject( playerid, 2, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785 ); // ChainsawDildo1 - lolatdick
- }
- case 4:
- {
- GivePlayerWeapon(playerid, 26, 64);
- }
- }
- break;
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(response)// They pressed the first button.
- {
- switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
- {
- case 4544:// Our dialog!
- {
- switch(listitem)// Checking which listitem was selected
- {
- case 0:
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- partyX = x,partyY = y, partyZ = z,partyVw = GetPlayerVirtualWorld(playerid);
- Party = 1;
- new str[74];
- format(str,sizeof(str),"%s has started a party",PlayerName(playerid));
- SendClientMessageToAll(LIGHTBLUE,str);
- SendClientMessageToAll(LIGHTBLUE,"Type (/party) to join it");
- }
- case 1:
- {
- partyX = -1563.1523,partyY = 63.7251, partyZ = 17.3312;
- partyVw=0;
- StartShipParty(playerid);
- Party = 1;
- }
- case 2:
- {
- partyX = 961.3387,partyY = -2487.3472, partyZ = 55.2720;
- partyVw=0;
- StartxMasParty(playerid);
- Party = 1;
- }
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement