Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- // Colored Checkpoints by Vince & O.K.Style™
- new ColoredCheckpoints[5];
- public OnFilterScriptInit()
- {
- ColoredCheckpoints[0] = CreateObject(1317, 1410.0, 1461.0, 9.82, 0.0, 0.0, 0.0);
- SetObjectMaterial(ColoredCheckpoints[0], 0, 18646, "matcolours", "red-4", 0x99FF0000); // name of texture or txd - same
- ColoredCheckpoints[1] = CreateObject(1317, 1412.0, 1461.0, 9.82, 0.0, 0.0, 0.0);
- SetObjectMaterial(ColoredCheckpoints[1], 0, 18646, "matcolours", "orange", 0x99FF8000);
- ColoredCheckpoints[2] = CreateObject(1317, 1414.0, 1461.0, 9.82, 0.0, 0.0, 0.0);
- SetObjectMaterial(ColoredCheckpoints[2], 0, 18646, "matcolours", "yellow", 0x99FFFF00);
- ColoredCheckpoints[3] = CreateObject(1317, 1416.0, 1461.0, 9.82, 0.0, 0.0, 0.0);
- SetObjectMaterial(ColoredCheckpoints[3], 0, 18646, "matcolours", "green", 0x99008000);
- ColoredCheckpoints[4] = CreateObject(1317, 1418.0, 1461.0, 9.82, 0.0, 0.0, 0.0);
- SetObjectMaterial(ColoredCheckpoints[4], 0, 18646, "matcolours", "blue", 0x990000FF);
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- new Float:x, Float:y, Float:z;
- /*
- for(new i = 0; i < sizeof(ColoredCheckpoints); i++)
- {
- GetObjectPos(ColoredCheckpoints[i], x, y, z);
- if(IsPlayerInRangeOfPoint(playerid, 1.0, x, y, z))
- {
- SendClientMessage(playerid, 0xFDE39DFF, "You are in checkpoint!");
- }
- }
- */
- GetObjectPos(ColoredCheckpoints[0], x, y, z);
- if(IsPlayerInRangeOfPoint(playerid, 1.0, x, y, z)) SendClientMessage(playerid, 0xFDE39DFF, "You are in red checkpoint!");
- // GetObjectPos(ColoredCheckpoints[1], x, y, z);
- // if(IsPlayerInRangeOfPoint(playerid, 1.0, x, y, z)) SendClientMessage(playerid, 0xFDE39DFF, "You are in orange checkpoint!");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement