Not working
#6

If you define vehicleid, then yes. Or:
pawn Код:
Carinfo[GetPlayerVehicleID(playerid)][F] += 5;
but make sure that the player who uses /usegc is driver because then passenger can get + fuel (abuse).

So change:
pawn Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"{FF6A22}INFO: {FFFFFF}You need to be in vehicle to use this command.");
to:
pawn Код:
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED,"{FF6A22}INFO: {FFFFFF}You need to be in vehicle to use this command.");
---

I'd also suggest you 2 more things:

Not using strcmp, use ZCMD or y_commands instead (speed)
For things that get only 2 values (0,1), use booleans. Boolean in combination of char in arrays reduces the size.
Reply


Messages In This Thread
Not working - by Lajko1 - 25.11.2013, 16:38
Re: Not working - by Konstantinos - 25.11.2013, 16:47
Re: Not working - by Lajko1 - 25.11.2013, 17:10
Re: Not working - by Konstantinos - 25.11.2013, 17:23
Re: Not working - by Lajko1 - 25.11.2013, 17:30
Re: Not working - by Konstantinos - 25.11.2013, 17:40
Re: Not working - by Lajko1 - 25.11.2013, 18:09

Forum Jump:


Users browsing this thread: 1 Guest(s)