17.05.2015, 13:03
here is my code that makes mys server.exe shutdown:
whats the prob?
pawn Код:
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);
}