Checkpoint help
#2

// top of script
pawn Код:
#define Bus1 2369.2412,1984.2220,10.8203
#define Bus2 2102.0513,2257.3037,11.0234
#define Bus3 2019.4841,1916.2048,12.3330
#define Bus4 Last Cordinates Here
// OnPlayerCommandText
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/bus", true) == 0)
{
SetPlayerCheckpoint(playerid, Bus1, 3.0);
SendClientMessage(playerid, COLOR_WHITE, "Go to each checkpoints around Las Vanturas, if you work hard, you can get some money" );
}
return 0;
}
// ONplayerEnterCheckpoint
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if (IsPlayerInRangeOfPoint(playerid, 3.0,Bus1))
{
SetPlayerCheckpoint(playerid, Bus2, 3.0);
PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
}
if (IsPlayerInRangeOfPoint(playerid, 3.0,Bus2))
{
SetPlayerCheckpoint(playerid, Bus3, 3.0);
PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
}
if (IsPlayerInRangeOfPoint(playerid, 3.0,Bus3))
{
SetPlayerCheckpoint(playerid, Bus4, 3.0);
PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
}
if (IsPlayerInRangeOfPoint(playerid, 3.0,Bus4))
{
SendClientMessage(playerid, COLOR_WHITE, "This Is All !!!" );
GivePlayerMoney(playerid, 20);
DisablePlayerCheckpoint(playerid);
PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
}
}
Hope it helped




Reply


Messages In This Thread
Checkpoint help - by samuel_hamza - 21.06.2010, 00:11
Re: Checkpoint help - by titanak - 21.06.2010, 00:27
Re: Checkpoint help - by (.Aztec); - 21.06.2010, 00:31
Re: Checkpoint help - by titanak - 21.06.2010, 00:33
Re: Checkpoint help - by samuel_hamza - 21.06.2010, 00:44
Re: Checkpoint help - by (.Aztec); - 21.06.2010, 00:48
Re: Checkpoint help - by samuel_hamza - 21.06.2010, 00:50

Forum Jump:


Users browsing this thread: 1 Guest(s)