help vehicles - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread:  help vehicles (
/showthread.php?tid=495524)
 
help vehicles - 
TexZena -  17.02.2014
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 
I would like to create a code that when a player enters in the vehicle, the pawno checks if the name matches 
to [vowno]
Re: help vehicles - 
Bingo -  17.02.2014
Not that much easy, I would suggest get a scripted vehicle system.