public OnPlayerEnterCheckpoint(playerid) { new vehicle; vehicle = GetVehicleModel(GetPlayerVehicleID(playerid)); if(IsPlayerInRangeOfPoint(playerid, 2, 669.7355,-1275.9504,13.4609)) //startwork { if(vehicle == 516) { SetPlayerMapIcon( playerid, 2, 334.4390,-1519.8026,35.7015, 55, 0, MAPICON_GLOBAL ); GameTextForPlayer(playerid,"~w~ Job Lvl 1~g~ :Travis Pastrana is going to participate the X-games",4000,3); SendClientMessage(playerid, COLOR_YELLOW, "|- Check the map to see the point where to go. -|"); IsWorking[playerid] = 1; FinishedTask1[playerid] = 1;//he entered the pickup DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,334.4390,-1519.8026,35.7015,2); //next checkpoint obviously... //De Textdraw TextDrawShowForPlayer(playerid,Opdracht); Opdracht = TextDrawCreate(4.000000,435.000000,"~w~Bring ~y~ Travis Pastrana ~w~ From ~b~His hotel~w~ To ~g~The stadium!"); TextDrawFont(Opdracht,1); TextDrawColor(Opdracht,0xFFFFFFAA); TextDrawLetterSize(Opdracht,0.4,1); TextDrawSetOutline(Opdracht,1); TextDrawSetShadow(Opdracht,0); TextDrawSetProportional(Opdracht,1); TextDrawBackgroundColor(Opdracht,0x000000ff); TextDrawUseBox(Opdracht, 1); TextDrawBoxColor(Opdracht, 0x000000AA); if(IsPlayerInRangeOfPoint(playerid, 50, 334.4390,-1519.8026,35.7015)) { SetPlayerCheckpoint(playerid,334.4390,-1519.8026,35.7015,2); } return 1; } //code here } else if(IsPlayerInRangeOfPoint(playerid, 2, 334.4390,-1519.8026,35.7015)) { if(vehicle == 516) { SetPlayerMapIcon( playerid, 2, 334.4390,-1519.8026,35.7015, 55, 0, MAPICON_GLOBAL ); GameTextForPlayer(playerid,"~w~ Job Lvl 1~g~ :Travis Pastrana is going to participate the X-games",4000,3); SendClientMessage(playerid, COLOR_YELLOW, "|- Check the map to see the point where to go. -|"); IsWorking[playerid] = 1; FinishedTask2[playerid] = 1;//he entered the pickup //De Textdraw TextDrawShowForPlayer(playerid,Opdracht); Opdracht = TextDrawCreate(4.000000,435.000000,"~w~Bring ~y~ Travis Pastrana ~w~ From ~b~His hotel~w~ To ~g~The stadium!"); TextDrawFont(Opdracht,1); TextDrawColor(Opdracht,0xFFFFFFAA); TextDrawLetterSize(Opdracht,0.4,1); TextDrawSetOutline(Opdracht,1); TextDrawSetShadow(Opdracht,0); TextDrawSetProportional(Opdracht,1); TextDrawBackgroundColor(Opdracht,0x000000ff); TextDrawUseBox(Opdracht, 1); TextDrawBoxColor(Opdracht, 0x000000AA); return 1; } } return 1; }
forward CheckpointCheck(); public CheckpointCheck() { for(new i; i<MAX_PLAYERS; i++)// a loop that goes though all players { if(IsPlayerConnected(i)) { if(IsPlayerInRangeOfPoint(i, 50, 669.7355,-1275.9504,13.4609)) //The first CP { SetPlayerCheckpoint(i,669.7355,-1275.9504,13.4609,2); //First CP } else { DisablePlayerCheckpoint(i); } } } return 1; }
uhm, i have his streamer installed but IDK how to work with a checkp streamer :/
|
public CheckpointCheck()
{
for(new i; i<MAX_PLAYERS; i++)// a loop that goes though all players
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 50, 669.7355,-1275.9504,13.4609)) //The first CP
{
SetPlayerCheckpoint(i,669.7355,-1275.9504,13.4609,2); //First CP
}
else if(IsPlayerInRangeOfPoint(i,50,.........................)) // SECOND CP
{
SetPlayerCheckpoint(i,.......); // second cp
}
else
{
DisablePlayerCheckpoint(i);
}
}
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
new vehicle;
vehicle = GetVehicleModel(GetPlayerVehicleID(playerid));
if(IsPlayerInRangeOfPoint(playerid, 2, 669.7355,-1275.9504,13.4609)) //startwork
{
//==============================================================================
//Travis Job
//==============================================================================
if(vehicle == 516)
{
if(IsWorking[playerid] == 0)
{
SetPlayerMapIcon( playerid, 2, 334.4390,-1519.8026,35.7015, 55, 0, MAPICON_GLOBAL );
GameTextForPlayer(playerid,"~w~ Job Lvl 1~g~ :Travis Pastrana is going to participate the X-games",4000,3);
SendClientMessage(playerid, COLOR_YELLOW, "|- Check the map to see the point where to go. -|");
IsWorking[playerid] = 1;
FinishedTask1[playerid] = 1;//he entered the pickup
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,334.4390,-1519.8026,35.7015,2);
//De Textdraw
TextDrawShowForPlayer(playerid,Opdracht);
Opdracht = TextDrawCreate(4.000000,435.000000,"~w~Bring ~y~ Travis Pastrana ~w~ From ~b~His hotel~w~ To ~g~The stadium!");
TextDrawFont(Opdracht,1);
TextDrawColor(Opdracht,0xFFFFFFAA);
TextDrawLetterSize(Opdracht,0.4,1);
TextDrawSetOutline(Opdracht,1);
TextDrawSetShadow(Opdracht,0);
TextDrawSetProportional(Opdracht,1);
TextDrawBackgroundColor(Opdracht,0x000000ff);
TextDrawUseBox(Opdracht, 1);
TextDrawBoxColor(Opdracht, 0x000000AA);
}
return 1;
}
//code here
}
else if(IsPlayerInRangeOfPoint(playerid, 2, 334.4390,-1519.8026,35.7015))
{
if(vehicle == 516)
{
if(IsWorking[playerid] == 1)
{
SetPlayerMapIcon( playerid, 2, 334.4390,-1519.8026,35.7015, 55, 0, MAPICON_GLOBAL );
GameTextForPlayer(playerid,"~w~ Job Lvl 1~g~ :Travis Pastrana is going to participate the X-games",4000,3);
SendClientMessage(playerid, COLOR_YELLOW, "|- Check the map to see the point where to go. -|");
IsWorking[playerid] = 1;
FinishedTask2[playerid] = 1;//he entered the pickup
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,2732.6616,-1841.6346,9.9145,2);
//De Textdraw
TextDrawShowForPlayer(playerid,Opdracht);
Opdracht = TextDrawCreate(4.000000,435.000000,"~w~Bring ~y~ Travis Pastrana ~w~ From ~b~His hotel~w~ To ~g~The stadium!");
TextDrawFont(Opdracht,1);
TextDrawColor(Opdracht,0xFFFFFFAA);
TextDrawLetterSize(Opdracht,0.4,1);
TextDrawSetOutline(Opdracht,1);
TextDrawSetShadow(Opdracht,0);
TextDrawSetProportional(Opdracht,1);
TextDrawBackgroundColor(Opdracht,0x000000ff);
TextDrawUseBox(Opdracht, 1);
TextDrawBoxColor(Opdracht, 0x000000AA);
}
return 1;
}
//code here
}
else if(IsPlayerInRangeOfPoint(playerid, 2, 2732.6616,-1841.6346,9.9145))
{
if(vehicle == 516)
{
if(IsWorking[playerid] == 1)
{
if(FinishedTask2[playerid] == 1)
{
DestroyPickup(traviswork2);
new string[128];
GameTextForPlayer(playerid,"~w~ Mission accomplished!",4000,3);
SendClientMessage(playerid, COLOR_GREEN, "-U have been given $1500 for completing a level 1 mission.-");
RemovePlayerMapIcon( playerid, 2 );
TextDrawHideForPlayer(playerid, Opdracht);
GivePlayerMoney(playerid,1500);
DisablePlayerCheckpoint(playerid);
FinishedTask2[playerid] = 0;
FinishedTask1[playerid] = 0;
IsWorking[playerid] = 0;
new mrand =random(500);
format(string,sizeof(string),"-Travis has given u $%d as a little bonus!-",mrand);
SendClientMessage(playerid,COLOR_GREEN,string);
GivePlayerMoney(playerid,mrand);
SendClientMessage(playerid, COLOR_SEXYGREEN, "-Mission accomplished, wanna go back to your base and do another mission? type /home.-");
}
}
return 1;
}
//code here
}
return 1;
}