new Bus1; new Bus2; new Bus3; new Bus4;
if(strcmp(cmd, "/bus", true) == 0) { Bus1 = SetPlayerCheckpoint(playerid, 2369.2412,1984.2220,10.8203, 3.0); SendClientMessage(playerid, COLOR_WHITE, "Go to each checkpoints around Las Vanturas, if you work hard, you can get some money" ); }
public OnPlayerEnterCheckpoint(playerid) { if(IsPlayerInCheckpoint(playerid) == Bus1) { GivePlayerMoney(playerid, 2); DisablePlayerCheckpoint(playerid); Bus2 = SetPlayerCheckpoint(playerid, 2369.2412,1984.2220,10.8203, 3.0); } if (IsPlayerInCheckpoint(playerid) == Bus2) { GivePlayerMoney(playerid, 2); DisablePlayerCheckpoint(playerid); Bus3 = SetPlayerCheckpoint(playerid, 2102.0513,2257.3037,11.0234, 3.0); } if (IsPlayerInCheckpoint(playerid) == Bus3) { GivePlayerMoney(playerid, 20); DisablePlayerCheckpoint(playerid); Bus4 = SetPlayerCheckpoint(playerid, 2019.4841,1916.2048,12.3330, 3.0); } if (IsPlayerInCheckpoint(playerid) == Bus4) { GivePlayerMoney(playerid, 20); DisablePlayerCheckpoint(playerid); SendClientMessage(playerid, red, "You served Las Vanturas as well!! here some money, but now I advice you to get this bus back..."); SendClientMessage(playerid, red, "or continue working with it, without checkpoints."); } return 1; }
#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
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;
}
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);
}
}
new Checkpoint[MAX_PLAYERS];
cmd(bus, playerid, params[])
{
Checkpoint[playerid] = 1;
return 1;
}
OnPlayerEnterCheckpoint(playerid)
{
if(Checkpoint[playerid] == 1)
{
//blah
}
else if(Checkpoint[playerid] == 2)
{
//blah
}
//..et cetera
return 1;
}
Originally Posted by » Titan «
// top of script
pawn Код:
pawn Код:
pawn Код:
![]() |
Originally Posted by Sky4D
Personally, I use:
pawn Код:
pawn Код:
pawn Код:
|
Originally Posted by samuel_hamza
I personelly, didn't understand anything from your script.
|
Originally Posted by Sky4D
Quote:
|