02.04.2017, 19:15
I start edit a rp gamemode and i make another cars for police and another factions, but when a player enter a vehicle it's check if the car is a CopCar or another faction....The problem is the function that was in gm(i edit because i made alot of cars and was a waste of time to put all in the row) it's not returning what suppose to
OnPlayerStateChange:
IsACopCar function:
The cause may be the last return or? Because i don't get it.....If i delete him give the warning of function need to have return value....
OnPlayerStateChange:
PHP код:
if(IsACopCar(newcar))
{
if(IsACop(playerid)) { }
else { RemovePlayerFromVehicleEx(playerid); SendClientMessage(playerid,COLOR_WHITE, "{999999}You are not a Cop."); }
}
PHP код:
public IsACopCar(carid)
{
for(new i = 1,j=81; i < j; i++)
{
if(carid == Copcar[i])
{
return 1;
}
else
return 0;
}
return 1;
}