SA-MP Forums Archive
Car OwnerShip Help - 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: Car OwnerShip Help (/showthread.php?tid=429803)



Car OwnerShip Help - Pillhead2007 - 11.04.2013

if(strmatch(VehicleInfo[vehicleid][vOwner],"Server")) === How Do I Make The Static Vehicles Equal String Server and Get Them Save .INI File

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
  if(
newstate == && oldstate == 1)
  {
    new 
vehicleid GetPlayerVehicleID(playerid);
    if(
strmatch(VehicleInfo[vehicleid][vOwner],GetName(playerid)))
    {
      new 
string[128];
      
format(string,sizeof(string),"Welcome To Your %s %s",VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400],GetName(playerid));
      
SendClientMessage(playerid,-1,string);
      
GameTextForPlayer(playeridstring30004);
    }
    else if(
strmatch(VehicleInfo[vehicleid][vOwner],"4Sale"))
    {
      new 
string[128];
      
format(string,sizeof(string),"This %s Is For Sale And Costs $%d, Type /buyvehicle To Buy This Vehicle",VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400],VehicleInfo[vehicleid][vPrice]);
      
SendClientMessage(playerid,-1,string);
      
GameTextForPlayer(playeridstring30004);
    }
    else if(
strmatch(VehicleInfo[vehicleid][vOwner],"Server"))
    {
      new 
string[128];
      
format(string,sizeof(string),"This %s Belongs To The Server And Can't Be Bought",VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
      
SendClientMessage(playerid,-1,string);
      
GameTextForPlayer(playeridstring30004);
    }
    else
    {
      new 
string[128];
      
format(string,sizeof(string),"This %s Belongs To %s",VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400],VehicleInfo[vehicleid][vOwner]);
      
SendClientMessage(playerid,-1,string);
      
GameTextForPlayer(playeridstring30004);
    }
  }
  return 
1;




Re: Car OwnerShip Help - [XST]O_x - 11.04.2013

pawn Код:
if(!strcmp(VehicleInfo[vehicleid][vOwner], "Server"))



Re: Car OwnerShip Help - Pillhead2007 - 11.04.2013

sorry should of been more clearer I meant " CreateVehicle(562,146.1736,-68.9954,1.4297,257.3596,1,0,86000) equals "Server" string


Re: Car OwnerShip Help - MP2 - 11.04.2013

Your Question Makes No Sense. Also Stop Typing Like This It's Fucking Annoying And It Makes Me Reply Like This Which Hurts My Pinky Finger.


Re: Car OwnerShip Help - Pillhead2007 - 11.04.2013

okies sorry its a habbit mp2 lol ermm basically Im trying to make server sided cars that cant be bought all though there is going to be a few around the city I want it so these cars become a string so it can be called in the onplayerstatechange


Re: Car OwnerShip Help - Pillhead2007 - 11.04.2013

found a way round it thanks guys