21.06.2010, 00:27
// top of script
// OnPlayerCommandText
// ONplayerEnterCheckpoint
Hope it helped
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
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;
}
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);
}
}