Sziasztok! Belekezdtem egy járõrözõs scriptbe, de amikor valaki belemegy a CP-be, nem adja be a következõt, és amiban az sem tûnik el.
[pawn]
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 427)
{
DisablePlayerCheckpoint(playerid);
new randombonusz = random(sizeof(bonusz), string[128], randomcp1 = random(sizeof(jarorcpcp));
format(string, sizeof(string), \"~r~%d ~w~$\", bonusz[randombonusz]);
GameTextForPlayer(playerid, string, 3000, 1);
GivePlayerMoney(playerid, bonusz[randombonusz]);
SetPlayerCheckpoint(playerid, jarorcp[randomcp1][0], jarorcp[randomcp1][1], jarorcp[randomcp1][2], 3);
}
}
return 1;
}
///////////////////////////////////////////////////////////////////////////
//Ez sem jó
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(pInfo[playerid][rendor] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 427)
{
SendClientMessage(playerid, COLOR_YELLOW, \"Abbahagytad a járõrözést!\");
DisablePlayerCheckpoint(playerid);
}
}
}
return 1;
}
[/pawn]