Error With preventing players from entering vehicles
#1

I get the errors:
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1038) : error 029: invalid expression, assumed zero
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1038) : warning 217: loose indentation
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1039) : error 017: undefined symbol "f"
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1040) : warning 217: loose indentation


From the code:
Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
	{
	if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
		Ѓ{
		f(team[playerid] != 2) // Change this to how you deal with teams in your script
			{
			RemovePlayerFromVehicle(playerid);
			}
		}
	}
Any solutions?
Reply
#2

f(team[playerid] != 2)
->
if(team[playerid] != 2)
Reply
#3

Quote:
Originally Posted by blank.
Посмотреть сообщение
f(team[playerid] != 2)
->
if(team[playerid] != 2)
I still get:
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1038) : error 029: invalid expression, assumed zero
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1038) : warning 217: loose indentation
Reply
#4

pawn Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
        {
        RemovePlayerFromVehicle(playerid);
        }
    }
Does this work?
Reply
#5

Quote:
Originally Posted by blank.
Посмотреть сообщение
pawn Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
        {
        RemovePlayerFromVehicle(playerid);
        }
    }
Does this work?
But this code is supposed to prevent team 2 from entering vehicles......
Reply
#6

pawn Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
        {
        if(team[playerid] == 2)
            {
            RemovePlayerFromVehicle(playerid);
            }
        }
Reply
#7

pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        if(team[playerid] != 2) // Change this to how you deal with teams in your script
        {
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
If it doesn't work then you use a different team system
Reply
#8

Quote:
Originally Posted by sjvt
Посмотреть сообщение
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        if(team[playerid] != 2) // Change this to how you deal with teams in your script
        {
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
If it doesn't work then you use a different team system
How is that even remotely related?
Reply
#9

Quote:
Originally Posted by sjvt
Посмотреть сообщение
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        if(team[playerid] != 2) // Change this to how you deal with teams in your script
        {
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
If it doesn't work then you use a different team system
That doesn't work on these "basic" teams. It doesn't even make sense.
Reply
#10

Quote:
Originally Posted by daac
Посмотреть сообщение
That doesn't work on these "basic" teams. It doesn't even make sense.
I know if i watch the main post i see if(team[playerid] != 2) so i think he use that because he dont tell us how his team system works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)