Advertisement
xt3z0ne

Stunt Sistem V3

May 19th, 2014
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 11.62 KB | None | 0 0
  1. /*
  2. ********************************************************************************
  3. ************************** Stunt Sistem By Rimmon ******************************
  4. ************************** And Edit Johnny        ******************************
  5. ************************** Contact                ******************************
  6. ************************** Y/m samp.johnny        ******************************
  7. ************************** Skype xt3z0ne123       ******************************
  8. *******************************************************************************/
  9. #include <  a_samp  >
  10. #include <  dini    >
  11. #include <  zcmd    >
  12. #include <  sscanf  >
  13. //==============================================================================
  14. #define PlayerStun      "LuxAdmin/Stunt/%s.ini"
  15. //==============================================================================
  16. #define MyStunt        (12000)
  17. #define SH             (12001)
  18. #define RED            (0xE60000AA)
  19. #define Color_Red       (0xE60000AA)
  20. #define GREEN          (0x8CE46CAA)
  21. #define YELLOW         (0xFFFF00AA)
  22. #define BLUE           (0x0000BBAA)
  23. #define ABLUE          (0x375FFFFF)
  24. #define                LIME 0x00FF00AA
  25. //==============================================================================
  26. #define BOX            (DIALOG_STYLE_MSGBOX)
  27. //==============================================================================
  28. //==============================================================================
  29. #define scm            SendClientMessage
  30. //==============================================================================
  31. #pragma tabsize 0
  32. //==============================================================================
  33. enum PLAYER_STUNT
  34. {
  35.    StuntPoint
  36. };
  37. //==============================================================================
  38. new giveplayerid, stunt1;
  39. new pInfo[MAX_PLAYERS][PLAYER_STUNT];
  40. new sstring[ 256 ];
  41. new Global_NAME[MAX_PLAYER_NAME];
  42. //==============================================================================
  43. public OnFilterScriptInit()
  44. {
  45.         new Stunt3DText[300];
  46.     //--------------------------------------------------------------------------
  47.     strcat(Stunt3DText, "{0072FF}Stunt\n\
  48.                                   {00FF00}Type {FF0000}/StartStunt {00FF00}to try this stunt!\n\
  49.                                                 {0072FF}Have fun!");
  50.     //--------------------------------------------------------------------------
  51.     Create3DTextLabel(Stunt3DText, LIME, 1705.5045, 1452.9928, 9.8187, 150, 0, 0           );
  52.     Create3DTextLabel(Stunt3DText, LIME, 1839.3021, 1562.0797, 10.0390, 150, 0, 0            );
  53.     Create3DTextLabel(Stunt3DText, LIME, 2168.1328, 1213.5763, 10.9927, 150, 0, 0           );
  54.     Create3DTextLabel(Stunt3DText, LIME, 2416.8218, 1358.4696, 20.4118, 150, 0, 0           );
  55.     Create3DTextLabel(Stunt3DText, LIME, 2826.7634, 1468.8693, 10.8887, 150, 0, 0           );
  56.     Create3DTextLabel(Stunt3DText, LIME, -2008.0447, 729.4238, 44.7940, 150, 0, 0           );
  57.     Create3DTextLabel(Stunt3DText, LIME, 1920.0028, 2009.4620, 10.5883, 150, 0, 0            );
  58.     Create3DTextLabel(Stunt3DText, LIME, 1876.2670,933.5334,10.2248, 150, 0, 0            );
  59.     //--------------------------------------------------------------------------
  60.     return 1;
  61. }
  62. //==============================================================================
  63. public OnPlayerConnect(playerid)
  64. {
  65.     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);
  66.     if(!dini_Exists(stun)) {
  67.         dini_Create(stun);
  68.         dini_IntSet(stun,"StuntPoint:", pInfo[playerid][StuntPoint]);
  69.     }
  70.     pInfo[playerid][StuntPoint] = dini_Int(stun,"StuntPoint:");
  71.     return 1;
  72. }
  73. //==============================================================================
  74. public OnPlayerDisconnect(playerid, reason)
  75. {
  76.     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);
  77.     dini_IntSet(stun,"StuntPoint:", pInfo[playerid][StuntPoint]);
  78.     return 1;
  79. }
  80. //==============================================================================
  81. public OnPlayerEnterCheckpoint(playerid)
  82. {
  83.     new cpid = SetPlayerCheckpoint(playerid,2118.5864, 1483.0841, 23.4166,4.0);
  84.     if (cpid == 1)
  85.     {
  86.         DisablePlayerCheckpoint(playerid);
  87.         GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
  88.     }
  89.     new cpid2 = SetPlayerCheckpoint(playerid,1851.7083, 1426.3226, 15.9196,4.0);
  90.     if (cpid2 == 1)
  91.     {
  92.         DisablePlayerCheckpoint(playerid);
  93.         GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
  94.     }
  95.     new cpid3 = SetPlayerCheckpoint(playerid,2000.9673, 1213.1139, 17.0789,4.0);
  96.     if (cpid3 == 1)
  97.     {
  98.         DisablePlayerCheckpoint(playerid);
  99.         GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
  100.     }
  101.     new cpid4 = SetPlayerCheckpoint(playerid,2396.9082, 1146.4279, 33.2691,4.0);
  102.     if (cpid4 == 1)
  103.     {
  104.         DisablePlayerCheckpoint(playerid);
  105.         GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
  106.     }
  107.     new cpid5 = SetPlayerCheckpoint(playerid,2776.7856, 1257.4076, 16.9512,4.0);
  108.     if (cpid5 == 1)
  109.     {
  110.         DisablePlayerCheckpoint(playerid);
  111.         GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
  112.     }
  113.     new cpid6 = SetPlayerCheckpoint(playerid,1958.6522, 1943.2184, 22.2268,4.0);
  114.     if (cpid6 == 1)
  115.     {
  116.         DisablePlayerCheckpoint(playerid);
  117.         GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
  118.     }
  119.     new cpid7 = SetPlayerCheckpoint(playerid,-1389.2230, 673.6660, 2.2660,4.0);
  120.     if (cpid7 == 1)
  121.     {
  122.         DisablePlayerCheckpoint(playerid);
  123.         GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
  124.     }
  125.     new cpid8 = SetPlayerCheckpoint(playerid,2103.2341,953.0029,15.3046,4.0);
  126.     if (cpid8 == 1)
  127.     {
  128.         DisablePlayerCheckpoint(playerid);
  129.         pInfo[giveplayerid][StuntPoint] +=20;
  130.         GameTextForPlayer(playerid, "~r~Stunt Finished~n~~y~+10 Coins~n~~y~+20 Stunt Point", 3000, 3);
  131.     }
  132.     return 1;
  133. }
  134. //==============================================================================
  135. CMD:setstunt(playerid, params[])
  136. {
  137.     if(IsPlayerAdmin(playerid) == 0) return SendClientMessage(playerid, RED, "ERROR: Only admins can use that command!");
  138.     if(sscanf(params, "ud", giveplayerid, stunt1)) return SendClientMessage(playerid, RED, "");
  139.     if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED, "ERROR: That player is not connected!");
  140.     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);
  141.     format(sstring, sizeof(sstring), "You have succesfully setted %s Stunt Point to %d!", Global_NAME, stunt1);
  142.     SendClientMessage(playerid, BLUE, sstring);
  143.     format(sstring, sizeof(sstring), "Admin %s has setted your Stunt Point to %d!", Name, stunt1);
  144.     SendClientMessage(giveplayerid, BLUE, sstring);
  145.     pInfo[giveplayerid][StuntPoint] = stunt1;
  146.     dini_IntSet(stun,"StuntPoint:", pInfo[giveplayerid][StuntPoint]);
  147.     return 1;
  148. }
  149. //==============================================================================
  150. CMD:startstunt(playerid,params[])
  151. {
  152. if(IsPlayerInRangeOfPoint(playerid,4,1705.5413, 1451.8380, 9.9487))
  153. {
  154. SetPlayerCheckpoint(playerid,2118.5864, 1483.0841, 23.4166,4.0);
  155. GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
  156. }
  157. else if(IsPlayerInRangeOfPoint(playerid,4,1839.3021, 1562.0797, 10.0390))
  158. {
  159. SetPlayerCheckpoint(playerid,1851.7083, 1426.3226, 15.9196,4.0);
  160. GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
  161. }
  162. else if(IsPlayerInRangeOfPoint(playerid,4,2168.1328, 1213.5763, 9.9927))
  163. {
  164. SetPlayerCheckpoint(playerid,2000.9673, 1213.1139, 17.0789,4.0);
  165. GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
  166. }
  167. else if(IsPlayerInRangeOfPoint(playerid,4,2416.8218, 1358.4696, 20.4118))
  168. {
  169. SetPlayerCheckpoint(playerid,2396.9082, 1146.4279, 33.2691,4.0);
  170. GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
  171. }
  172. else if(IsPlayerInRangeOfPoint(playerid,4,2826.7634, 1468.8693, 9.8887))
  173. {
  174. SetPlayerCheckpoint(playerid,2776.7856, 1257.4076, 16.9512,4.0);
  175. GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
  176. }
  177. else if(IsPlayerInRangeOfPoint(playerid,4,1921.0787, 2007.8939, 9.3720))
  178. {
  179. SetPlayerCheckpoint(playerid,1958.6522, 1943.2184, 22.2268,4.0);
  180. GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
  181. }
  182. else if(IsPlayerInRangeOfPoint(playerid,4,-2008.0447, 729.4238, 44.3538))
  183. {
  184. SetPlayerCheckpoint(playerid,-1389.2230, 673.6660, 2.2660,4.0);
  185. GameTextForPlayer(playerid,"~g~Go To The~r~ Checkpoint",5000,5);
  186. }
  187. return 1;
  188. }
  189. //==============================================================================
  190. CMD:sss1(playerid,params[])
  191. {
  192.     SetPlayerPos(playerid,1705.5045, 1452.9928, 9.8187);
  193.     return 1;
  194. }
  195. //==============================================================================
  196. CMD:sss2(playerid,params[])
  197. {
  198.      SetPlayerPos(playerid,1839.3021, 1562.0797, 10.0390);
  199.      return 1;
  200. }
  201. //==============================================================================
  202. CMD:sss3(playerid,params[])
  203. {
  204.      SetPlayerPos(playerid,2168.1328, 1213.5763, 10.9927);
  205.      return 1;
  206. }
  207. //==============================================================================
  208. CMD:sss4(playerid,params[])
  209. {
  210.      SetPlayerPos(playerid,2416.8218, 1358.4696, 20.4118);
  211.      return 1;
  212. }
  213. //==============================================================================
  214. CMD:sss5(playerid,params[])
  215. {
  216.      SetPlayerPos(playerid,2826.7634, 1468.8693, 10.8887);
  217.      return 1;
  218. }
  219. //==============================================================================
  220. CMD:sss7(playerid,params[])
  221. {
  222.      SetPlayerPos(playerid,-2008.0447, 729.4238, 44.7940);
  223.      return 1;
  224. }
  225. //==============================================================================
  226. CMD:sss6(playerid,params[])
  227. {
  228.      SetPlayerPos(playerid,1920.0028, 2009.4620, 10.5883);
  229.      return 1;
  230. }
  231. //==============================================================================
  232. CMD:sss8(playerid,params[])
  233. {
  234.      SetPlayerPos(playerid,1876.2670,933.5334,10.2248);
  235.      return 1;
  236. }
  237. //==============================================================================
  238. CMD:leavestunt(playerid,params[])
  239. {
  240.      DisablePlayerCheckpoint(playerid);
  241.      return 1;
  242. }
  243. //==============================================================================
  244. CMD:sss(playerid,params[])
  245. {
  246.      SendClientMessage(playerid,Color_Red,"Usage:sss<1-9>");
  247.      return 1;
  248. }
  249. //==============================================================================
  250. public OnPlayerExitVehicle(playerid, vehicleid)
  251. {
  252.      DisablePlayerCheckpoint(playerid);
  253.      return 1;
  254. }
  255. /*
  256. ********************************************************************************
  257. ************************** Stunt Sistem By Rimmon ******************************
  258. ************************** And Edit Johnny        ******************************
  259. ************************** Contact                ******************************
  260. ************************** Y/m samp.johnny        ******************************
  261. ************************** Skype xt3z0ne123       ******************************
  262. *******************************************************************************/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement