Problem with CarOwnership /buycar MSG
#1

I've Implanted the FS of the Carownership I had into my Gamemode...
Now the problem is that it doesn't show me the /buyveh command
here is the DRIVERSTATE:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == 2)
    {
    new vehicleid = GetPlayerStreamVehicleID(playerid);
    if(GetCreatorID(vehicleid)!=0)
    {
  if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
  {
  new ex[128];
  format(ex,sizeof(ex),"[ Vehicle Owner: %s ]",VehicleSystem[GetCreatorID(vehicleid)][owner]);
  SendClientMessage(playerid,COLOR_YELLOW,ex);
  }
  else if(strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar"))
  {
  if(!IsPlayerAdmin(playerid)){
  TogglePlayerControllable(playerid,0);}
  new fffx[128];
  format(fffx,sizeof(fffx),"This Vehicle is for Sale. Price %d$",VehicleSystem[GetCreatorID(vehicleid)][preis]);
  SendClientMessage(playerid,COLOR_WHITE,fffx);
  SendClientMessage(playerid,COLOR_YELLOW,"Use /buyveh to Buy it.");
  }
  else
  {
  TogglePlayerControllable(playerid,0);
  TogglePlayerControllable(playerid,1);
  new ex[128];
  format(ex,sizeof(ex),"[ Vehicle Owner: %s ]",VehicleSystem[GetCreatorID(vehicleid)][owner]);
  SendClientMessage(playerid,COLOR_YELLOW,ex);
  }
  }
    }
    return 1;
}
And when I implant this:
pawn Код:
new vehicleid = GetPlayerStreamVehicleID(playerid);
    if(GetCreatorID(vehicleid)!=0)
    {
  if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
  {
  new ex[128];
  format(ex,sizeof(ex),"[ Vehicle Owner: %s ]",VehicleSystem[GetCreatorID(vehicleid)][owner]);
  SendClientMessage(playerid,COLOR_YELLOW,ex);
  }
  else if(strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar"))
  {
  if(!IsPlayerAdmin(playerid)){
  TogglePlayerControllable(playerid,0);}
  new fffx[128];
  format(fffx,sizeof(fffx),"This Vehicle is for Sale. Price %d$",VehicleSystem[GetCreatorID(vehicleid)][preis]);
  SendClientMessage(playerid,COLOR_WHITE,fffx);
  SendClientMessage(playerid,COLOR_YELLOW,"Use /buyveh to Buy it.");
  }
  else
  {
  TogglePlayerControllable(playerid,0);
  TogglePlayerControllable(playerid,1);
  new ex[128];
  format(ex,sizeof(ex),"[ Vehicle Owner: %s ]",VehicleSystem[GetCreatorID(vehicleid)][owner]);
  SendClientMessage(playerid,COLOR_YELLOW,ex);
  }
  }
Under:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
It doesn't show the MSG....
Whats the problem?
Reply
#2

You think this;
When you enter buyable car that not showing to type /buycar or /carbuy to buy car
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)