[AJUDA] Callback
#8

nao estб fufando quando eu caio do veiculo ou saio naum aparece a text:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) {
        for(new i; i < MAX_PLAYERS; i++) {
            if(GetPlayerVehicleID(playerid) == VeiculoID[i]) {
                if(GetPlayerVehicleID(playerid) == VeiculoID[playerid]) {
                    format(gstring, sizeof(gstring), "{EE3B3B}[INFO]: {FFFFFF}%s seja bem vindo ao seu veнculo criado por vocк.", PlayerName(playerid));
                    SendClientMessage(playerid, 0x9966FFAA, gstring);
                    Delete3DTextLabel(TextVeH[GetPlayerVehicleID(playerid)]);
                }
                else if(GetPlayerVehicleID(playerid) != VeiculoID[playerid]) {
                    if(GetPlayerVehicleID(playerid) == VeiculoID[i]) {
                        format(gstring, sizeof(gstring), "{EE3B3B}[INFO]: {FFFFFF}Esse veнculo pertence a '%s' e vocк nao pode dirigi-lo, use: {EE3B3B}/v {FFFFFF}para criar.", PlayerName(VeiculoID[playerid]));
                        SendClientMessage(playerid, 0xFF6633AA, gstring);
                        PlayerPlaySound(playerid, 1147, 0.0, 0.0, 0.0);
                        RemovePlayerFromVehicle(playerid);
                    }
                    else {
                        Update3DTextLabelText( TextVeH[ GetPlayerVehicleID( playerid ) ], -1, gstring );
                    }
                }
                if( oldstate == PLAYER_STATE_DRIVER ) {
                    if(GetPlayerVehicleID(playerid) == VeiculoID[i]) {
                        if(GetPlayerVehicleID(playerid) == VeiculoID[playerid]) {
                            format(gstring, 256, "{FFFACD}Veнculo de:\n{FFFFFF}%s {FFFACD}[ID:%d]",PlayerName(playerid), playerid);
                            TextVeH[GetPlayerVehicleID(playerid)] = Create3DTextLabel(gstring, -1, 0.0, 0.0, 0.0, 50.0, 0, 1);
                            Attach3DTextLabelToVehicle(TextVeH[GetPlayerVehicleID(playerid)], VeiculoID[playerid], 0.0, 0.0, 0.0+1);
                            Update3DTextLabelText( TextVeH[ GetPlayerVehicleID( playerid ) ], -1, gstring );
                            SendClientMessage(playerid, -1, "{EE3B3B}[INFO]: {FFFFFF}Voce pode puxar o seu veнculo ate voce usando: /trazerv");
                        }
                    }
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
[AJUDA] Callback - by Victor_Souz4 - 11.02.2012, 21:04
Re: [AJUDA] Callback - by Dolby - 11.02.2012, 21:09
Re: [AJUDA] Callback - by Victor_Souz4 - 11.02.2012, 21:15
Re: [AJUDA] Callback - by Ricop522 - 11.02.2012, 22:09
Re: [AJUDA] Callback - by Lуs - 11.02.2012, 23:36
Re: [AJUDA] Callback - by dudaefj - 12.02.2012, 01:09
Re: [AJUDA] Callback - by isli27 - 12.02.2012, 01:12
Re: [AJUDA] Callback - by Victor_Souz4 - 12.02.2012, 09:51

Forum Jump:


Users browsing this thread: 1 Guest(s)