Problem
#1

Hi all,i've this code in OnPlayerStateChange

Код:
if (newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
    {
        new veh = GetVehicleModel(GetPlayerVehicleID(playerid));
        if(veh == 520)
        {
            new m = GetPlayerMoney(playerid), cost = 20000;
            SendClientMessage(playerid, 0xFFFFFF, "You need 20.000$ to enter in the Hydra.");
            if (m < cost) RemovePlayerFromVehicle(playerid);
            else if(m > cost) GivePlayerMoney(playerid,-cost);
            SendClientMessage(playerid, 0xFFFFFF, "Enjoy your Hydra.");
  }
        if(veh == 425)
        {
            new m = GetPlayerMoney(playerid), cost = 35000;
            SendClientMessage(playerid, 0xFFFFFF, "You need 35.000$ to enter in the Hunter.");
            if (m < cost) RemovePlayerFromVehicle(playerid);
            else if(m > cost) GivePlayerMoney(playerid,-cost);
            SendClientMessage(playerid, 0xFFFFFF, "Enjoy your Hunter,remember to rape all!");
  }
        if(veh == 432)
        {
            new m = GetPlayerMoney(playerid), cost = 15000;
            SendClientMessage(playerid, 0xFFFFFF, "You need 15.000$ to enter in the Rhino.");
            if (m < cost) RemovePlayerFromVehicle(playerid);
            else if(m > cost) GivePlayerMoney(playerid,-cost);
            SendClientMessage(playerid, 0xFFFFFF, "Enjoy your Rhino.");
  }
  return 1;
}
The code working fine,i just have errors with the Messages.

Example: I dont have the requested $,i enter in a Hydra (example vehicle) and i get the normal message:

Код:
SendClientMessage(playerid, 0xFFFFFF, "You need 20.000$ to enter in the Hydra.");
And:
Код:
SendClientMessage(playerid, 0xFFFFFF, "Enjoy your Hydra.");
Same with others vehicles,what's the error?
Reply


Messages In This Thread
Problem - by Face9000 - 18.12.2010, 18:04
Re: Problem - by blackwave - 18.12.2010, 18:08
Re: Problem - by Face9000 - 18.12.2010, 18:10
Re: Problem - by Benjo - 18.12.2010, 18:11
Re: Problem - by blackwave - 18.12.2010, 18:12
Re: Problem - by Face9000 - 18.12.2010, 18:18
Re: Problem - by blackwave - 18.12.2010, 18:24
Re: Problem - by Face9000 - 18.12.2010, 18:29
Re: Problem - by blackwave - 18.12.2010, 18:32
Re: Problem - by Face9000 - 18.12.2010, 18:46

Forum Jump:


Users browsing this thread: 2 Guest(s)