Advertisement
OKStyle

Colored Checkpoints

May 10th, 2012
1,890
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.74 KB | None | 0 0
  1. #include <a_samp>
  2. // Colored Checkpoints by Vince & O.K.Style™
  3. new ColoredCheckpoints[5];
  4. public OnFilterScriptInit()
  5. {
  6.     ColoredCheckpoints[0] = CreateObject(1317, 1410.0, 1461.0, 9.82, 0.0, 0.0, 0.0);
  7.     SetObjectMaterial(ColoredCheckpoints[0], 0, 18646, "matcolours", "red-4", 0x99FF0000); // name of texture or txd - same
  8.  
  9.     ColoredCheckpoints[1] = CreateObject(1317, 1412.0, 1461.0, 9.82, 0.0, 0.0, 0.0);
  10.     SetObjectMaterial(ColoredCheckpoints[1], 0, 18646, "matcolours", "orange", 0x99FF8000);
  11.  
  12.     ColoredCheckpoints[2] = CreateObject(1317, 1414.0, 1461.0, 9.82, 0.0, 0.0, 0.0);
  13.     SetObjectMaterial(ColoredCheckpoints[2], 0, 18646, "matcolours", "yellow", 0x99FFFF00);
  14.  
  15.     ColoredCheckpoints[3] = CreateObject(1317, 1416.0, 1461.0, 9.82, 0.0, 0.0, 0.0);
  16.     SetObjectMaterial(ColoredCheckpoints[3], 0, 18646, "matcolours", "green", 0x99008000);
  17.  
  18.     ColoredCheckpoints[4] = CreateObject(1317, 1418.0, 1461.0, 9.82, 0.0, 0.0, 0.0);
  19.     SetObjectMaterial(ColoredCheckpoints[4], 0, 18646, "matcolours", "blue", 0x990000FF);
  20.     return 1;
  21. }
  22. public OnPlayerUpdate(playerid)
  23. {
  24.     new Float:x, Float:y, Float:z;
  25. /*
  26.     for(new i = 0; i < sizeof(ColoredCheckpoints); i++)
  27.     {
  28.         GetObjectPos(ColoredCheckpoints[i], x, y, z);
  29.         if(IsPlayerInRangeOfPoint(playerid, 1.0, x, y, z))
  30.         {
  31.             SendClientMessage(playerid, 0xFDE39DFF, "You are in checkpoint!");
  32.         }
  33.     }
  34. */
  35.     GetObjectPos(ColoredCheckpoints[0], x, y, z);
  36.     if(IsPlayerInRangeOfPoint(playerid, 1.0, x, y, z)) SendClientMessage(playerid, 0xFDE39DFF, "You are in red checkpoint!");
  37. //  GetObjectPos(ColoredCheckpoints[1], x, y, z);
  38. //  if(IsPlayerInRangeOfPoint(playerid, 1.0, x, y, z)) SendClientMessage(playerid, 0xFDE39DFF, "You are in orange checkpoint!");
  39.     return 1;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement