Won't remove player from the RC vehicle.
#1

Well, I want the player to be removed from the RC Baron if he/she press the LCTRL key (fires a minigun), but it doesn't works. Can someone please help me out?

pawn Код:
if(PRESSED(KEY_ACTION))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            if(GetVehicleModel(GetPlayerVehicleID(playerid) == 464))
            {
                SetPlayerPos(playerid, RCPos[playerid][0], RCPos[playerid][1], RCPos[playerid][2]);
                return SendClientMessage(playerid, COLOR_ORANGE, "[WARNING:] RC Baron's minigun is disabled, don't use it.");
            }
        }
    }
Reply
#2

Код:
if(PRESSED(KEY_ACTION))
change to
Код:
if(PRESSED(KEY_FIRE))
+rep:P
Reply
#3

But it's not a fire key. Fire key is LMB I suppose? Anyways, gonna try it out.

EDIT: Not working.
Reply
#4

hm ok let me chekk it out...

Код:
if(PRESSED(KEY_ACTION))
    {
        if(IsPlayerInVehicle(playerid))
        {
            if(GetVehicleModel(GetPlayerVehicleID(playerid, == 464))
            {
                SetPlayerPos(playerid, RCPos[playerid, 0], RCPos[playerid, 1], RCPos[playerid][2]);
                return SendClientMessage(playerid, COLOR_ORANGE, "[WARNING:] RC Baron's minigun is disabled, don't use it.");
            }
        }
    }
try this and if theres errors tell us kk.
Reply
#5

I found another way. Apparently it doesn't gets the Model ID due to the fact that the player isn't actually in a vehicle. Something to do with original San Andreas. I just made a variable that stores the info if the player entered RC Baron and used that instead of GetVehicleMode. Works great. Thanks for help.
Reply
#6

did you helplol or did you do it yourself
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)