[Ajuda] Identificar se o player entrou no carro dele ou nгo
#7

Quote:
Originally Posted by DarthVeider
Посмотреть сообщение
eu nгo sei se ta certo eu fiz agora pelo celular mas vк ai:
PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    new 
aname[MAX_PLAYER_NAME];
     
GetPlayerName(playeridanameMAX_PLAYER_NAME);
      new 
vehicle;
       
vehicle GetPlayerVehicleID(playerid);
    if(
newstate == PLAYER_STATE_DRIVER)
    {
           
format(carros2sizeof(carros2),"carros/%s.txt"aname);
         if(
DOF2_GetInt(carros2,"CarroDaConce") == 1)
          {
               if(
DonoCarro[GetPlayerVehicleID(playerid)] != INVALID_PLAYER_ID && DonoCarro[GetPlayerVehicleID(playerid)] != playerid)
               {
                   
SendClientMessage(playerid,-1,"| ERRO | Esse veнculo nгo pertence a vocк.");
                   
RemovePlayerFromVehicle(playerid);
               }
              else
               {
                   
format(msg,sizeof(msg),"{76EE00}| INFO | Bem-Vindo ao seu veнculo %s",aname);
                   
SendClientMessage(playerid,-1,msg);
               }
         }
            else
           {
               
SendClientMessage(playerid ,-1,"carro pъblico");
           }
        return 
1;

ficou a mesma coisa :/
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)