23.02.2011, 22:13
Okay^^ I make /lock in my Car , -> My Car is now closed with this code
when now the Car explode with me in the car, and the car respawned cant i get in the car
how can i make when the Car respawn - the Server make the car open automatic ?
i hope you understand me
Код:
if(!strcmp(cmdtext,"/lock")) { new Float:VX,Float:VY,Float:VZ; for(new vehicleid=1;vehicleid<MAX_VEHICLES;vehicleid++) { GetVehiclePos(vehicleid,VX,VY,VZ); if(!IsPlayerInRangeOfPoint(playerid,2.5,VX,VY,VZ))continue; if(Lock[vehicleid] == 0) { Lock[vehicleid] = 1; SendClientMessage(playerid,COLOR_GREEN," Car is now closed."); break; } if(Lock[vehicleid] == 1) { Lock[vehicleid] = 0; SendClientMessage(playerid,COLOR_GREEN," Car is now open."); break; } } return 1; }
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(Lock[vehicleid] == 1) { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_GREEN," This Car is closed!"); return 1; }
i hope you understand me
