02.05.2012, 12:04
Hello,
i have a big problem with PLAYER_STATE_DRIVER.
When im testing it local, it would work perfectly. But when i test it on my root-linux server, it wont work. Why?
Did anybody have such a problem?
Here is a code for example, that works on my local server, but not on my root server (the first code under PLAYER_STATE_DRIVER works without problems):
public IsARentableBike(carid) looks like:
i have a big problem with PLAYER_STATE_DRIVER.
When im testing it local, it would work perfectly. But when i test it on my root-linux server, it wont work. Why?
Did anybody have such a problem?
Here is a code for example, that works on my local server, but not on my root server (the first code under PLAYER_STATE_DRIVER works without problems):
Код:
if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish { new newcar = GetPlayerVehicleID(playerid); if(IsARentableBike(newcar)) { print("IsARentableBike"); if(saveBikeCarID[playerid] != newcar) { GetVehicleParamsEx(newcar,engine,light,alarm,doors,bonnet,boot,objective2); SetVehicleParamsEx(newcar,VEHICLE_PARAMS_OFF,light,alarm,doors,bonnet,boot,objective2); canStartEngine[playerid] = 1; SendClientMessage(playerid,COLOR_YELLOW,"You can rent this bike, type /rentcar!"); return 1; } else { GetVehicleParamsEx(newcar,engine,light,alarm,doors,bonnet,boot,objective2); SetVehicleParamsEx(newcar,VEHICLE_PARAMS_ON,light,alarm,doors,bonnet,boot,objective2); } } if(IsARentablePlane(newcar)) { print("IsARentablePlane"); if(saveCarCarID[playerid] != newcar) { GetVehicleParamsEx(newcar,engine,light,alarm,doors,bonnet,boot,objective2); SetVehicleParamsEx(newcar,VEHICLE_PARAMS_OFF,light,alarm,doors,bonnet,boot,objective2); canStartEngine[playerid] = 1; SendClientMessage(playerid,COLOR_YELLOW,"You can rent this plane, type /rentcar!"); return 1; } else { GetVehicleParamsEx(newcar,engine,light,alarm,doors,bonnet,boot,objective2); SetVehicleParamsEx(newcar,VEHICLE_PARAMS_ON,light,alarm,doors,bonnet,boot,objective2); } } }
Код:
public IsARentableBike(carid) { for(new i = 0; i < sizeof(RentBikes); i++) { if(carid == RentBikes[i]) return 1; } return 0; }