Remove player from certains Vehicles ID - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Remove player from certains Vehicles ID (
/showthread.php?tid=129320)
Remove player from certains Vehicles ID -
Fedee! - 21.02.2010
Well, I tryed on OnPlayerupdate and OnPlayerEnterVehicle, but I easily failed
I need to player be removed if he enters on certains vehicles id. (More than 127 vehicles id)
Re: Remove player from certains Vehicles ID -
Scenario - 21.02.2010
I don't think I quite understand. What do you want again? Please elaborate more on this topic.
Re: Remove player from certains Vehicles ID -
Fedee! - 21.02.2010
Example: If player enters on Vehicle ID 31, he gets removed.
Thanks.
Re: Remove player from certains Vehicles ID -
Razvann - 21.02.2010
Try this.
pawn Код:
if(IsPlayerInVehicle(playerid, 31))
{
RemovePlayerFromVehicle(playerid);
}
Re: Remove player from certains Vehicles ID -
aircombat - 21.02.2010
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new vehicleid = GetPlayerVehicleID(playerid);
new modelid = GetVehicleModel(vehicleid);
if(newkeys == 2 || newkeys == 3)
{
if(vehiclelid == 31)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,0xFF9900AA, "This vehicle is not allowed!");
}
}
return 1;
}
________
Latina Cam
Re: Remove player from certains Vehicles ID -
Fedee! - 22.02.2010
Doesn't work... another one?
Re: Remove player from certains Vehicles ID -
Onyx09 - 22.02.2010
do something like thiissss
Код:
forward PrivateCars(carid);
public OnPlayerEnterVehicle(playerid, vehicleid)
{
if (PrivateCars(vehicleid))
{
RemovePlayerFromVehicle(playerid);
}
}
public PrivateCars(carid)
{
if((carid >= 0) && (carid <= 0))
{
return 1;
}
return 0;
}
its a mini tut for you to use xD
Re: Remove player from certains Vehicles ID -
Correlli - 22.02.2010
You should check this part again (it's a big mistake):
Quote:
Originally Posted by [GM
LeGenDy ]
Код:
if((carid >= 0) && (carid <= 0))
|
Re: Remove player from certains Vehicles ID -
Fedee! - 22.02.2010
Quote:
Originally Posted by Don Correlli
You should check this part again (it's a big mistake):
Quote:
Originally Posted by [GM
LeGenDy ]
Код:
if((carid >= 0) && (carid <= 0))
|
|
pawn Код:
if((carid >= 0) && (carid =< 0))
Solved?
Re: Remove player from certains Vehicles ID -
Correlli - 22.02.2010
Quote:
Originally Posted by Fedee!
Solved?
|
No.
Quote:
Originally Posted by [GM
LeGenDy ]
Код:
if((carid >= 0) && (carid <= 0))
|
Is it possible for
carid to be bigger or equal to 0
AND smaller or equal to 0? No, it's not.