[Help]RemovePlayerFromVehicle - 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: [Help]RemovePlayerFromVehicle (
/showthread.php?tid=363958)
[Help]RemovePlayerFromVehicle -
Deaglez - 29.07.2012
I want to make the zombie team remove from car
cause zombie cant drive
is it supposed to be like this ?
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(gTeam[playerid] == TEAM_ZOMBIES) // Idk if its right
RemovePlayerFromVehicle(playerid); // or RemovePlayerFromVehicle();
SendClientMessage(playerid, COLOR_RED, "Error: Zombies can't drive a vehicle");
return 1;
}
if this correct/uncorrect
please tell me!
Tnx
Re: [Help]RemovePlayerFromVehicle -
Cjgogo - 29.07.2012
YES,but you forgot two brackets,like this:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(gTeam[playerid] == TEAM_ZOMBIES)
{//this one
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "Error: Zombies can't drive a vehicle");
}//and this one
return 1;
}
SO,yes,basically it's correct
Re: [Help]RemovePlayerFromVehicle -
Deaglez - 29.07.2012
i mean how to make zombie auto remove from vehicle
when i enter in game as zombie....
it says "Error: Zombies can't drive" << this one correct
When i enter the vehicle, cant remove the player ! why << uncorrect
Re: [Help]RemovePlayerFromVehicle -
Andi_Evandy - 29.07.2012
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(gTeam[playerid] == TEAM_ZOMBIES)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_RED, "Error: Zombies can't drive a vehicle");
}
return 1;
}