12.11.2010, 22:27
Quote:
Hey,
I have 2 big problems. 1.: when my engine is off, you should cannot drive. easy: SetVehicleVelocity(vehicleid,0.0,0.0,z); but the velocity should set when he want to drive, so: when the keys are: w or s. newkeys & KEY_UP || newkeys & KEY_DOWN. But when the Keys are pressed nothing happened. I already look at samp wiki but i cant define it. 2.: i want to turn the Pay nґSpray off. when he drive in, his car will be repair. but this shouldnґt happen! where i should write it. I try it under OnVehicleRespray and OnVehiclePaintJob, but it doesnґt work! this are 2 big problems which must be solved. |
Quote from Wiki:
pawn Код:
public OnPlayerUpdate(playerid)
{
new Keys,ud,lr;
GetPlayerKeys(playerid,Keys,ud,lr);
if(ud > 0) SendClientMessage(playerid, 0xFFFFFFFF, "DOWN");
else if(ud < 0) SendClientMessage(playerid, 0xFFFFFFFF, "UP");
if(lr > 0) SendClientMessage(playerid, 0xFFFFFFFF, "RIGHT");
else if(lr < 0) SendClientMessage(playerid, 0xFFFFFFFF, "LEFT");
return 1;
}