2 Questions, Keys & Pay nґ Spray
#2

Quote:
Originally Posted by Psycho77
Посмотреть сообщение
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.
1. KEY_UP it isn't.. just make a GetPlayerKeys under OnPlayerUpdate, check the vehicle HP, and if is less than 500.0, by getting the player keys, you set the car velocity.

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;
}
2. Just put some fences outside the Pay 'N' Spray, so people can't go in.
Reply


Messages In This Thread
2 Questions, Keys & Pay nґ Spray - by Psycho77 - 12.11.2010, 22:18
Re: 2 Questions, Keys & Pay nґ Spray - by The_Moddler - 12.11.2010, 22:27
Re: 2 Questions, Keys & Pay nґ Spray - by GaGlets(R) - 12.11.2010, 22:30
Re: 2 Questions, Keys & Pay nґ Spray - by Psycho77 - 12.11.2010, 22:32

Forum Jump:


Users browsing this thread: 1 Guest(s)