How do they do it?
#1

I was just wondering. Basically on a server you can't use a hydra unless you are rank 5. So when you get in and you'r not rank 5, it kicks you out.

Somehow, sometimes people who are not rank 5 can fly it.. How is this possible ?
Reply
#2

RemovePlayerFromVehicle sometimes, but rarely, doesn't properly eject a player out of a vehicle. Plus, the famous 'NOP RemovePlayerFromVehicle' is often used. Some servers seem to counteract it with setting the player position away from the vehicle, though.
Reply
#3

You need to do this (depening on your player info variables) (under OnPlayerEnterVehicle)

new vid = GetPlayerVehicleID(playerid);
new vehicle =GetVehicleModel(vid);
if(PlayerInfo[playerid][Rank] < 5 && Vehicleid == 520))
{
new Float:posx, Float:posy, Float:posz;
GetPlayerPos(playerid, posx, posy, posz);
SetPlayerPos(playerid, posx, posy, posz);
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_HERE, "You must be rank 5 to enter this vehicle!");
return 1;
}
Reply
#4

Variable failure?

pawn Код:
OnPlayerStateChange(....)
{
    if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 && RankVar[playerid] != 5)
    {
        // Kick player out of vehicle
    }
}
Not sure if that's what you are looking for though
Again, could be a problem with your variables.
Reply
#5

Код:
if(newstate == PLAYER_STATE_DRIVER)
{
new vehid = GetPlayerVehicleID(playerid);
new vehicle =GetVehicleModel(vehid);
if(vehicle == 520)
{
if(PlayerInfo[playerid][Rank] < 5)
{
RemovePlayerFromVehicle(playerid);
shouldnt have problems
Reply
#6

Quote:
Originally Posted by Saurik
Посмотреть сообщение
Код:
if(newstate == PLAYER_STATE_DRIVER)
{
new vehid = GetPlayerVehicleID(playerid);
new vehicle =GetVehicleModel(vehid);
if(vehicle == 520)
{
if(PlayerInfo[playerid][Rank] < 5)
{
RemovePlayerFromVehicle(playerid);
shouldnt have problems
In everything ive ever done regarding this, if(newstate == PLAYER_STATE_DRIVER) that never worked, i used what i posted above.. just make sure you define IsAHydra(vehicleid) somewhere in your script, EX:
Reply
#7

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
Variable failure?

pawn Код:
OnPlayerStateChange(....)
{
    if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 && RankVar[playerid] != 5)
    {
        // Kick player out of vehicle
    }
}
Not sure if that's what you are looking for though
Again, could be a problem with your variables.
it is what im looking for and my script is basically the same thing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)