[Pedido] Nгo poder entrar no veiculo se nгo for da org
#2

Nгo sei se vocк quer algo do tipo, mas vamos lб.

Pode ser feito de duas maneiras:

1

PHP Code:
public OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    if(
vehicleid == || vehicleid == || vehicleid == 3)
    {
        if(
PlayerData[playerid][pOrg] != ORG_POLICIAL)
        {
            new 
Float:cPos[3];
            
            
GetPlayerPos(playeridcPos[0], cPos[1], cPos[2]);
            
SetPlayerPos(playeridcPos[0], cPos[1], cPos[2]);
            
SendClientMessage(playerid, -1"Esse veнculo й da org de Policial.");
        }
    }
    return 
1;

2

PHP Code:
public OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    for(new 
1!= 3; ++i)
    {
        if(
vehicleid == i)
        {
            if(
PlayerData[playerid][pOrg] != ORG_POLICIAL)
            {
                new 
Float:cPos[3];

                
GetPlayerPos(playeridcPos[0], cPos[1], cPos[2]);
                
SetPlayerPos(playeridcPos[0], cPos[1], cPos[2]);
                
SendClientMessage(playerid, -1"Esse veнculo й da org de Policial.");
            }
        }
    }
    return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)