21.06.2010, 00:11
Well, I'm making some bus route script.
I already made it, but there are some problems, see below please
When the player goes to bus1 checkpoint, it works as well and he gets next checkpoint, but when he goes to next one, the checkpoint doesn't move, I found out the problem which it shouldn't be "if" function in "OnPlayerEnterCheckpoint", I don't know how to make it reaching in ever checkpoint.
I already made it, but there are some problems, see below please
Код:
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; }