Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ********************************************************************************
- ************************** Stunt Sistem By Rimmon ******************************
- ************************** And Edit Johnny ******************************
- ************************** Contact ******************************
- ************************** Y/m samp.johnny ******************************
- ************************** Skype xt3z0ne123 ******************************
- *******************************************************************************/
- #include < a_samp >
- #include < dini >
- #include < zcmd >
- #include < sscanf >
- //==============================================================================
- #define PlayerStun "LuxAdmin/Stunt/%s.ini"
- //==============================================================================
- #define MyStunt (12000)
- #define SH (12001)
- #define RED (0xE60000AA)
- #define Color_Red (0xE60000AA)
- #define GREEN (0x8CE46CAA)
- #define YELLOW (0xFFFF00AA)
- #define BLUE (0x0000BBAA)
- #define ABLUE (0x375FFFFF)
- #define LIME 0x00FF00AA
- //==============================================================================
- #define BOX (DIALOG_STYLE_MSGBOX)
- //==============================================================================
- //==============================================================================
- #define scm SendClientMessage
- //==============================================================================
- #pragma tabsize 0
- //==============================================================================
- enum PLAYER_STUNT
- {
- StuntPoint
- };
- //==============================================================================
- new giveplayerid, stunt1;
- new pInfo[MAX_PLAYERS][PLAYER_STUNT];
- new sstring[ 256 ];
- new Global_NAME[MAX_PLAYER_NAME];
- //==============================================================================
- public OnFilterScriptInit()
- {
- new Stunt3DText[300];
- //--------------------------------------------------------------------------
- strcat(Stunt3DText, "{0072FF}Stunt\n\
- {00FF00}Type {FF0000}/StartStunt {00FF00}to try this stunt!\n\
- {0072FF}Have fun!");
- //--------------------------------------------------------------------------
- Create3DTextLabel(Stunt3DText, LIME, 1705.5045, 1452.9928, 9.8187, 150, 0, 0 );
- Create3DTextLabel(Stunt3DText, LIME, 1839.3021, 1562.0797, 10.0390, 150, 0, 0 );
- Create3DTextLabel(Stunt3DText, LIME, 2168.1328, 1213.5763, 10.9927, 150, 0, 0 );
- Create3DTextLabel(Stunt3DText, LIME, 2416.8218, 1358.4696, 20.4118, 150, 0, 0 );
- Create3DTextLabel(Stunt3DText, LIME, 2826.7634, 1468.8693, 10.8887, 150, 0, 0 );
- Create3DTextLabel(Stunt3DText, LIME, -2008.0447, 729.4238, 44.7940, 150, 0, 0 );
- Create3DTextLabel(Stunt3DText, LIME, 1920.0028, 2009.4620, 10.5883, 150, 0, 0 );
- Create3DTextLabel(Stunt3DText, LIME, 1876.2670,933.5334,10.2248, 150, 0, 0 );
- //--------------------------------------------------------------------------
- return 1;
- }
- //==============================================================================
- public OnPlayerConnect(playerid)
- {
- new stun[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(stun,sizeof(stun),PlayerStun,Name);
- if(!dini_Exists(stun)) {
- dini_Create(stun);
- dini_IntSet(stun,"StuntPoint:", pInfo[playerid][StuntPoint]);
- }
- pInfo[playerid][StuntPoint] = dini_Int(stun,"StuntPoint:");
- return 1;
- }
- //==============================================================================
- public OnPlayerDisconnect(playerid, reason)
- {
- new stun[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(stun,sizeof(stun),PlayerStun,Name);
- dini_IntSet(stun,"StuntPoint:", pInfo[playerid][StuntPoint]);
- return 1;
- }
- //==============================================================================
- public OnPlayerEnterCheckpoint(playerid)
- {
- new cpid = SetPlayerCheckpoint(playerid,2118.5864, 1483.0841, 23.4166,4.0);
- if (cpid == 1)
- {
- DisablePlayerCheckpoint(playerid);
- GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
- }
- new cpid2 = SetPlayerCheckpoint(playerid,1851.7083, 1426.3226, 15.9196,4.0);
- if (cpid2 == 1)
- {
- DisablePlayerCheckpoint(playerid);
- GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
- }
- new cpid3 = SetPlayerCheckpoint(playerid,2000.9673, 1213.1139, 17.0789,4.0);
- if (cpid3 == 1)
- {
- DisablePlayerCheckpoint(playerid);
- GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
- }
- new cpid4 = SetPlayerCheckpoint(playerid,2396.9082, 1146.4279, 33.2691,4.0);
- if (cpid4 == 1)
- {
- DisablePlayerCheckpoint(playerid);
- GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
- }
- new cpid5 = SetPlayerCheckpoint(playerid,2776.7856, 1257.4076, 16.9512,4.0);
- if (cpid5 == 1)
- {
- DisablePlayerCheckpoint(playerid);
- GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
- }
- new cpid6 = SetPlayerCheckpoint(playerid,1958.6522, 1943.2184, 22.2268,4.0);
- if (cpid6 == 1)
- {
- DisablePlayerCheckpoint(playerid);
- GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
- }
- new cpid7 = SetPlayerCheckpoint(playerid,-1389.2230, 673.6660, 2.2660,4.0);
- if (cpid7 == 1)
- {
- DisablePlayerCheckpoint(playerid);
- GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
- }
- new cpid8 = SetPlayerCheckpoint(playerid,2103.2341,953.0029,15.3046,4.0);
- if (cpid8 == 1)
- {
- DisablePlayerCheckpoint(playerid);
- pInfo[giveplayerid][StuntPoint] +=20;
- GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
- }
- return 1;
- }
- //==============================================================================
- CMD:setstunt(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) == 0) return SendClientMessage(playerid, RED, "ERROR: Only admins can use that command!");
- if(sscanf(params, "ud", giveplayerid, stunt1)) return SendClientMessage(playerid, RED, "");
- if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED, "ERROR: That player is not connected!");
- new stun[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(giveplayerid, Global_NAME, sizeof(Global_NAME));GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(stun,sizeof(stun),PlayerStun,Name);
- format(sstring, sizeof(sstring), "You have succesfully setted %s Stunt Point to %d!", Global_NAME, stunt1);
- SendClientMessage(playerid, BLUE, sstring);
- format(sstring, sizeof(sstring), "Admin %s has setted your Stunt Point to %d!", Name, stunt1);
- SendClientMessage(giveplayerid, BLUE, sstring);
- pInfo[giveplayerid][StuntPoint] = stunt1;
- dini_IntSet(stun,"StuntPoint:", pInfo[giveplayerid][StuntPoint]);
- return 1;
- }
- //==============================================================================
- CMD:startstunt(playerid,params[])
- {
- if(IsPlayerInRangeOfPoint(playerid,4,1705.5413, 1451.8380, 9.9487))
- {
- SetPlayerCheckpoint(playerid,2118.5864, 1483.0841, 23.4166,4.0);
- GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,4,1839.3021, 1562.0797, 10.0390))
- {
- SetPlayerCheckpoint(playerid,1851.7083, 1426.3226, 15.9196,4.0);
- GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,4,2168.1328, 1213.5763, 9.9927))
- {
- SetPlayerCheckpoint(playerid,2000.9673, 1213.1139, 17.0789,4.0);
- GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,4,2416.8218, 1358.4696, 20.4118))
- {
- SetPlayerCheckpoint(playerid,2396.9082, 1146.4279, 33.2691,4.0);
- GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,4,2826.7634, 1468.8693, 9.8887))
- {
- SetPlayerCheckpoint(playerid,2776.7856, 1257.4076, 16.9512,4.0);
- GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,4,1921.0787, 2007.8939, 9.3720))
- {
- SetPlayerCheckpoint(playerid,1958.6522, 1943.2184, 22.2268,4.0);
- GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,4,-2008.0447, 729.4238, 44.3538))
- {
- SetPlayerCheckpoint(playerid,-1389.2230, 673.6660, 2.2660,4.0);
- GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
- }
- return 1;
- }
- //==============================================================================
- CMD:sss1(playerid,params[])
- {
- SetPlayerPos(playerid,1705.5045, 1452.9928, 9.8187);
- return 1;
- }
- //==============================================================================
- CMD:sss2(playerid,params[])
- {
- SetPlayerPos(playerid,1839.3021, 1562.0797, 10.0390);
- return 1;
- }
- //==============================================================================
- CMD:sss3(playerid,params[])
- {
- SetPlayerPos(playerid,2168.1328, 1213.5763, 10.9927);
- return 1;
- }
- //==============================================================================
- CMD:sss4(playerid,params[])
- {
- SetPlayerPos(playerid,2416.8218, 1358.4696, 20.4118);
- return 1;
- }
- //==============================================================================
- CMD:sss5(playerid,params[])
- {
- SetPlayerPos(playerid,2826.7634, 1468.8693, 10.8887);
- return 1;
- }
- //==============================================================================
- CMD:sss7(playerid,params[])
- {
- SetPlayerPos(playerid,-2008.0447, 729.4238, 44.7940);
- return 1;
- }
- //==============================================================================
- CMD:sss6(playerid,params[])
- {
- SetPlayerPos(playerid,1920.0028, 2009.4620, 10.5883);
- return 1;
- }
- //==============================================================================
- CMD:sss8(playerid,params[])
- {
- SetPlayerPos(playerid,1876.2670,933.5334,10.2248);
- return 1;
- }
- //==============================================================================
- CMD:leavestunt(playerid,params[])
- {
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- //==============================================================================
- CMD:sss(playerid,params[])
- {
- SendClientMessage(playerid,Color_Red,"Usage:sss<1-9>");
- return 1;
- }
- //==============================================================================
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- /*
- ********************************************************************************
- ************************** Stunt Sistem By Rimmon ******************************
- ************************** And Edit Johnny ******************************
- ************************** Contact ******************************
- ************************** Y/m samp.johnny ******************************
- ************************** Skype xt3z0ne123 ******************************
- *******************************************************************************/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement