help vehicles
#1

Hello everyone I have a problem.
in this code

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	new name[MAX_PLAYER_NAME+1];
        format(VehicleInfo[playerid][vOwner],24,"%s", name);
 if(newstate == PLAYER_STATE_DRIVER) 
           {
 if(VehicleInfo[playerid][vOwner] == GetPlayerName(playerid, name, sizeof(name)) )
      {    
        SaveID(playerid);
        SendClientMessage(playerid,COLOR_GREEN,"welcome to your vehicle");
      }
    else
    {
	SendClientMessage(playerid,COLOR_RED,"this isn't your vehicle");
     }
    
}
 return 1;
}
in the ini file
Код:
Owner = My_Name
I would like to create a code that when a player enters in the vehicle, the pawno checks if the name matches
to [vowno]
Reply
#2

Not that much easy, I would suggest get a scripted vehicle system.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)