[Ajuda] Aparecer texto para todos os passageiros
#5

Quote:
Originally Posted by Coe1
Посмотреть сообщение
Exemplo:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {

        if(motor[playerid] == 1){ Funзгo.. }
    }
    else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {

        TextDrawHideForPlayer(playerid, suatxd);
                motor[playerid] = 0;

    }
    return 1;
}
me ajuda ai sistema do motor
PHP код:
    if (strcmp("/motor"cmdtexttrue10) == 0)
    {
        new 
State;
        new 
motlualarporcappormaob;
        new 
carro GetPlayerVehicleID(playerid);
        if(
carro != INVALID_VEHICLE_ID)
        {
            if(
IsPlayerInAnyVehicle(playerid))
            {
             
State=GetPlayerState(playerid);
            if(
State!=PLAYER_STATE_DRIVER)
            {
                
MSGPLAYER(playerid,COLOR_GREY,"   Vocк nгo й o motorista/piloto do veнculo");
                return 
1;
            }
            if(
motor[playerid] == 0)
            {
                
GetVehicleParamsEx(carromotlualarporcappormaob);
                
SetVehicleParamsEx(carroVEHICLE_PARAMS_ONlualarporcappormaob);
                
motor[playerid] = 1;
                
SendClientMessage(playerid0xFFFFFFAA"Veiculo {2F991A}Ligado, {FFFFFF}Digite /motor para desliga-lo");
            }
            else if(
motor[playerid] == 1)
            {
                
GetVehicleParamsEx(carromotlualarporcappormaob);
                
SetVehicleParamsEx(carroVEHICLE_PARAMS_OFFlualarporcappormaob);
                
motor[playerid] = 0;
                
SendClientMessage(playerid0xFFFFFFAA"Veiculo {E31919}Desligado, {FFFFFF}Digite /motor para liga-lo");
            }
        }
              }
        return 
1;
    } 
E isso
PHP код:
            if(motor[i] == 1)
            {
            
format(velopet5,sizeof(velopet5),"~r~~h~~h~~h~~h~Motor: ~w~Ligado");
            
motor[playerid] = 1// ligado
            
}
            else if(
motor[i] == 0)
            {
            
format(velopet5,sizeof(velopet5),"~r~~h~~h~~h~~h~Motor: ~w~Desligado");
            
motor[playerid] = 0// desligado
            
}
            
TextDrawSetString(MotorOnOFF[i], velopet5); 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)