TAB problem.
#1

I maded that my car fix by pressing 2 and when its not in vehicle it says "You need to be in vehicle"
But when i click TAB it says the same thing twice! And when in car, it doesn't say that, but doesn't fix the car?

So my question is:
How to fix when i click TAB doesn't say that you need to be in vehicle

Code:
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define IsPlayerNotInVehicle(%0) (!IsPlayerInAnyVehicle(%0))

new vehicleid = GetPlayerVehicleID(playerid);
if(PRESSED(KEY_SUBMISSION))
{
if(IsPlayerInVehicle(playerid, vehicleid))
{
RepairVehicle(vehicleid);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_SYSTEM, "SERVER: {FFFFFF}Колата ви е поправена!");
}
}
if(PRESSED(KEY_ACTION))
{
if(IsPlayerNotInVehicle(playerid))
{
SendClientMessage(playerid, COLOR_SYSTEM, "SERVER: {FF2800}Не сте в превоз. средство!");
}
}

Help!
Reply
#2

Quote:
Originally Posted by Lixyde
Посмотреть сообщение
if(IsPlayerNotInVehicle(playerid))
Try using !IsPlayerInAnyVehicle
https://sampwiki.blast.hk/wiki/IsPlayerInAnyVehicle
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)