Advertisement
Guest User

CheckpointEx Include (c9 Ap0llinaris

a guest
Jul 28th, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.83 KB | None | 0 0
  1. /*
  2.     *- SetPlayerCheckpointEx Include (c) by Ap0llinaris.
  3.     *- E-Mail: mirkogrunst@googlemail.com
  4.     *- Skype: mirko19971
  5.     *- Language: Deutsch/German & Englisch/English
  6.     *- Include-Version: 1.0
  7.    
  8.     - Deutsch/German -
  9.     *- Du hast einen Fehler gefunden? Dann sende ihn mir per E-Mail oder per Skype.
  10.    
  11.     - Englisch/English -
  12.     *- You've found a bug? Then send it to me via e-mail or Skype.
  13.  
  14.     - Ende/End -
  15.     - Deutsch/German:
  16.         Ich hoffe, dass euch die Include gefällt. Hinterlasst mir doch ein kleines Feedback. ;)
  17.     - Englisch/English:
  18.         I hope you like the include. Just leave me a little feedback. ;)
  19. */
  20.  
  21. #include <a_samp>
  22.  
  23. #define         INVALID_CHECKPOINT_ID           -255
  24. #define         INVALID_CHECKPOINT_TYPE         -255   
  25.  
  26. new PlayerCheckpointID[MAX_PLAYERS];
  27. new PlayerCheckpointType[MAX_PLAYERS];
  28.  
  29. stock SetPlayerCheckpointEx(playerid, Float:posX, Float:posY, Float:posZ, Float:cpSize, CheckPointID, CheckPointType){
  30.     DisablePlayerCheckpoint(playerid);
  31.     SetTimerEx("apCheckpoint", 100, 0, "dffffdd", playerid, posX, posY, posZ, cpSize, CheckPointID, CheckPointType);
  32.     return;
  33. }
  34.  
  35. forward apCheckpoint(playerid, Float:posX, Float:posY, Float:posZ, Float:cpSize, CheckPointID, CheckPointType);
  36. public apCheckpoint(playerid, Float:posX, Float:posY, Float:posZ, Float:cpSize, CheckPointID, CheckPointType){
  37.     if(IsPlayerConnected(playerid)){
  38.         PlayerCheckpointID[playerid] = CheckPointID;
  39.         PlayerCheckpointType[playerid] = CheckPointType;
  40.         SetPlayerCheckpoint(playerid, posX, posY, posZ, cpSize);
  41.     }
  42.     return;
  43. }
  44.  
  45. stock DisablePlayerCheckpointEx(playerid){
  46.     PlayerCheckpointID[playerid] = INVALID_CHECKPOINT_ID;
  47.     PlayerCheckpointType[playerid] = INVALID_CHECKPOINT_TYPE;
  48.     return;
  49. }
  50.  
  51. stock GetPlayerCheckpointID(playerid){
  52.     return PlayerCheckpointID[playerid];
  53. }
  54.  
  55. stock GetPlayerCheckpointType(playerid){
  56.     return PlayerCheckpointType[playerid];
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement