public OnPlayerEnterCheckpoint(playerid)
{
if(Ccp[playerid] == 1) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 2; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, -1874.0277,-1675.2848,21.7418, 3.0); // Creates a new checkpoint at a different position
new rand = RandomEx(0,8);
SendClientMessage(playerid, COLOR_WHITE, "You have loaded %s materials in your package, Proceed to next pickup.", rand);
}
else if(Ccp[playerid] == 2) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 3; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, 2085.2393,-2092.6560,13.5309, 3.0); // Creates a new checkpoint at a different position
new rand = RandomEx(0,13);
SendClientMessage(playerid, COLOR_WHITE, "You have loaded %s materials in your package, Proceed to next pickup", rand);
}
else if(Ccp[playerid] == 3) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 4; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, 1354.1035,481.0210,20.2016, 3.0); // Creates a new checkpoint at a different position
new rand = RandomEx(0,13);
SendClientMessage(playerid, COLOR_WHITE, "You have loaded %s materials in your package, Proceed to next pickup", rand);
}
else if(Ccp[playerid] == 4) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 5; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, 2107.0288,-1887.4937,13.5410, 3.0); // Creates a new checkpoint at a different position
new rand = RandomEx(0,13);
SendClientMessage(playerid, COLOR_WHITE, "You have loaded %s materials in your package, Proceed to next pickup", rand);
}
else if(Ccp[playerid] == 5) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 6; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, 2543.7610,-2389.5366,13.6344, 3.0); // Creates a new checkpoint at a different position
SendClientMessage(playerid, COLOR_WHITE, "You have sucessfully compleated you delivery, Return to LA Docks to get paid");
}
else if(Ccp[playerid] == 6) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 0; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
//SetPlayerCheckpoint(playerid, 2543.7610,-2389.5366,13.6344, 3.0); // Creates a new checkpoint at a different position
new cash = RandomEx(8000,40001);
SendClientMessage(playerid, COLOR_WHITE, "You have sucessfully compleated you delivery, LA Docks has paid you $%s and some mats Enjoy!", cash);
GivePlayerMoney(playerid, cash);
}
SendClientMessage(playerid, COLOR_WHITE, "You have loaded %s materials in your package, Proceed to next pickup.", rand);
pawn Код:
|
Not necessarily. He could be using hooks, or a library that does the hook. Besides, would it compile if he wasn't (number of arguments warning)?
|
pawn Код:
|
new string[80];
format(string, sizeof (string), "You have loaded %i materials in your package, Proceed to next pickup.", rand);
SendClientMessage(playerid, -1, string);
RandomEx(8,0)
// which would results to value such the one you got
if(Ccp[playerid] == 1) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 2; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, -1874.0277,-1675.2848,21.7418, 3.0); // Creates a new checkpoint at a different position
new rand = RandomEx(0,8);
SendClientMessage(playerid, COLOR_WHITE, "You have loaded %d materials in your package, Proceed to next pickup.", rand);
}
else if(Ccp[playerid] == 2) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 3; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, 2085.2393,-2092.6560,13.5309, 3.0); // Creates a new checkpoint at a different position
new rand = RandomEx(0,13);
SendClientMessage(playerid, COLOR_WHITE, "You have loaded %d materials in your package, Proceed to next pickup", rand);
}
else if(Ccp[playerid] == 3) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 4; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, 1354.1035,481.0210,20.2016, 3.0); // Creates a new checkpoint at a different position
new rand = RandomEx(0,13);
SendClientMessage(playerid, COLOR_WHITE, "You have loaded %d materials in your package, Proceed to next pickup", rand);
}
else if(Ccp[playerid] == 4) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 5; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, 2107.0288,-1887.4937,13.5410, 3.0); // Creates a new checkpoint at a different position
new rand = RandomEx(0,13);
SendClientMessage(playerid, COLOR_WHITE, "You have loaded %d materials in your package, Proceed to next pickup", rand);
}
else if(Ccp[playerid] == 5) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 6; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, 2543.7610,-2389.5366,13.6344, 3.0); // Creates a new checkpoint at a different position
SendClientMessage(playerid, COLOR_WHITE, "You have sucessfully compleated you delivery, Return to LA Docks to get paid");
}
else if(Ccp[playerid] == 6) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 0; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
//SetPlayerCheckpoint(playerid, 2543.7610,-2389.5366,13.6344, 3.0); // Creates a new checkpoint at a different position
new cash = RandomEx(8000,40001);
SendClientMessage(playerid, COLOR_WHITE, "You have sucessfully compleated you delivery, LA Docks has paid you $%d and some mats Enjoy!", cash);
GivePlayerMoney(playerid, cash);
}
CMD:loadmats(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); if(IsPlayerInRangeOfPoint(playerid, 5.0, 2568.7224,-2419.9768,13.6341)) { if(IsAWarehouseTruck(vehicleid)) { if(PlayerInfo[playerid][pJob] != 4) { SendClientMessage(playerid, COLOR_WHITE, "You are not a Warehouse worker!"); } else { SendClientMessage(playerid, COLOR_WHITE, "You have picked a material's package, Proceed to next pickup"); SetPlayerCheckpoint(playerid, 2311.5037,-74.1533,26.4751, 3.0); Ccp[playerid] = 1; } } else SendClientMessage(playerid, COLOR_WHITE, "You need to be inside a Warehouse truck to pick a materials package!"); } else SendClientMessage(playerid, COLOR_WHITE, "You are not at the package loading point!"); return 1; }
IsAWarehouseTruck(carid) { if(carid == 499) return 1; }