12.09.2013, 19:54
Script:
Errors are on lines:
if(CarCheck == Cars[Grove] )
if(CarCheck == Cars[Ballas] )
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2)
{
new CarCheck = GetPlayerVehicleID(playerid);
if(CarCheck == Cars[Grove] )
{
if(gTeam[playerid] != 100)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "You Don't have the keys for this car!");
return 1;
}
}
if(CarCheck == Cars[Ballas] )
{
if(gTeam[playerid] != 101)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "You Don't have the keys for this car!");
return 1;
}
}
return 1;
}
return 1;
}
if(CarCheck == Cars[Grove] )
if(CarCheck == Cars[Ballas] )
PHP код:
error 032: array index out of bounds (variable "Cars")

