Won't remove player from the RC vehicle. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Won't remove player from the RC vehicle. (
/showthread.php?tid=354532)
Won't remove player from the RC vehicle. -
Makaveli93 - 27.06.2012
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.");
}
}
}
Re: Won't remove player from the RC vehicle. -
[A]ndrei - 27.06.2012
Код:
if(PRESSED(KEY_ACTION))
change to
Код:
if(PRESSED(KEY_FIRE))
+rep:P
Re: Won't remove player from the RC vehicle. -
Makaveli93 - 27.06.2012
But it's not a fire key. Fire key is LMB I suppose? Anyways, gonna try it out.
EDIT: Not working.
Re: Won't remove player from the RC vehicle. -
[A]ndrei - 27.06.2012
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.
Re: Won't remove player from the RC vehicle. -
Makaveli93 - 27.06.2012
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.
Re: Won't remove player from the RC vehicle. -
[A]ndrei - 27.06.2012
did you help

lol or did you do it yourself