OnPlayerstatechange Problem
#3

Quote:
Originally Posted by mineralo
Посмотреть сообщение
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new newcar = GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(VehicleInfo[newcar][vMember] == gTeam[playerid] && VehicleInfo[newcar][vRank] <= pInfo[playerid][pRank])
        {
            if(gTeam != VMember)
            {
            SendClientMessage(playerid,COLOR_RED,"You can't drive this car");
            RemovePlayerFromVehicle(playerid);
            return 1;
            }
        }
    }
    return 1;
}
try this
tried this and error:
Код:
error 017: undefined symbol "VMember"
also I tried this but everywhone can enter car
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new newcar = GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(VehicleInfo[newcar][vMember] == gTeam[playerid] && VehicleInfo[newcar][vRank] <= pInfo[playerid][pRank])
        {
            if(gTeam[playerid] != VehicleInfo[newcar][vMember])
            {
            SendClientMessage(playerid,COLOR_RED,"You can't drive this car");
            RemovePlayerFromVehicle(playerid);
            return 1;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
OnPlayerstatechange Problem - by rati555 - 19.01.2012, 16:37
Re: OnPlayerstatechange Problem - by mineralo - 19.01.2012, 17:03
Re: OnPlayerstatechange Problem - by rati555 - 19.01.2012, 17:19
Re: OnPlayerstatechange Problem - by sameer419 - 19.01.2012, 17:23
Re: OnPlayerstatechange Problem - by rati555 - 19.01.2012, 17:25
Re: OnPlayerstatechange Problem - by [ABK]Antonio - 19.01.2012, 17:42
Re: OnPlayerstatechange Problem - by rati555 - 19.01.2012, 17:51

Forum Jump:


Users browsing this thread: 3 Guest(s)