[Help]RemovePlayerFromVehicle
#1

I want to make the zombie team remove from car
cause zombie cant drive

is it supposed to be like this ?

PHP код:
public OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
        if(
gTeam[playerid] == TEAM_ZOMBIES// Idk if its right
        
RemovePlayerFromVehicle(playerid); // or RemovePlayerFromVehicle();
        
SendClientMessage(playeridCOLOR_RED"Error: Zombies can't drive a vehicle");
    return 
1;

if this correct/uncorrect
please tell me!

Tnx
Reply
#2

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
Reply
#3

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
Reply
#4

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)