Car OwnerShip Help
#1

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;

Reply
#2

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

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

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.
Reply
#5

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
Reply
#6

found a way round it thanks guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)