Whats wrong with this?
#9

Ok, i tryed to do it but when i go in the vehicle it doesnt say the price of the vehicle or its owner..
so here it is as gametext, can you make it into a clientmessage?
the price and owner works as gametext but when i tryed to make it clientmessage it didnt show it like that
here it is as gametext-
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(GetPlayerVehicleID(playerid) >= VCount) return 1;
	new car = GetPlayerVehicleID(playerid);   new msg[256];

	if(newstate==PLAYER_STATE_DRIVER)
	{
		new PlayerName[100]; GetPlayerName(playerid,PlayerName,30);
		if(VehicleInfo[car][CarOwned] == 1)
		{
      if(strcmp(PlayerName,VehicleInfo[car][CarOwner],true) == 0) {
      GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~This is your vehicle",2000,3);
      } else {
			format(msg,sizeof(msg),"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~This vehicle belongs to %s", VehicleInfo[car][CarOwner] );
		  GameTextForPlayer(playerid,msg,2000,3); }
		}
		else if(VehicleInfo[car][Buyable] == 0)
		{
		format(msg,sizeof(msg),"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~This vehicle is not for sell", VehicleInfo[car][CarOwner] );
		GameTextForPlayer(playerid,msg,2000,3);
		}
		else
		{
		format(msg,sizeof(msg),"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~This car is for sell Price $%d",VehicleInfo[car][Price]);
    GameTextForPlayer(playerid,msg,2000,3);
		}
 	}

	if(newstate==PLAYER_STATE_PASSENGER)
	{
		if(VehicleInfo[car][CarOwned] == 1)
		{
		format(msg,sizeof(msg),"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~This vehicle belongs to %s", VehicleInfo[car][CarOwner] );
	  GameTextForPlayer(playerid,msg,2000,3);
		}
	}

	return 1;
}
Reply


Messages In This Thread
Whats wrong with this? - by DevilRP - 19.05.2010, 13:24
Re: Whats wrong with this? - by ViruZZzZ_ChiLLL - 19.05.2010, 13:26
Re: Whats wrong with this? - by DevilRP - 19.05.2010, 13:46
Re: Whats wrong with this? - by ViruZZzZ_ChiLLL - 19.05.2010, 13:46
Re: Whats wrong with this? - by DevilRP - 19.05.2010, 13:52
Re: Whats wrong with this? - by RoamPT - 19.05.2010, 14:00
Re: Whats wrong with this? - by DevilRP - 19.05.2010, 14:21
Re: Whats wrong with this? - by RoamPT - 19.05.2010, 14:39
Re: Whats wrong with this? - by DevilRP - 19.05.2010, 14:43
Re: Whats wrong with this? - by RoamPT - 19.05.2010, 14:56

Forum Jump:


Users browsing this thread: 1 Guest(s)