Little problem.
#3

When player enter to car who is in market player get's dialog with id 5227,and how you see i check model,money,but this work,just for first checking car model now is REMINGTON.

Код:
if(model == 534)//REMINGTON
    {
    if(GetPlayerMoneyA(playerid) < 9000)
    {
    SendClientMessage(playerid,  COLOR_RED, "Enought money");
    SetVehicleToRespawn(vehicleid);
    return 1;
    }
    if(PlayerData[playerid][pcar] == -1)
    {
    SendClientMessage(playerid, COLOR_GREEN, "You buy REMINGTON=1");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREEN, "You buy REMINGTON=2");
    return 1;
    }
This code is work,but when i add more:

Код:
if(model == 534)//REMINGTON
    {
    if(GetPlayerMoneyA(playerid) < 9000)
    {
    SendClientMessage(playerid,  COLOR_RED, "Enought money");
    SetVehicleToRespawn(vehicleid);
    return 1;
    }
    if(PlayerData[playerid][pcar] == -1)
    {
    SendClientMessage(playerid, COLOR_GREEN, "You buy REMINGTON=1");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREEN, "You buy REMINGTON=2");
    return 1;
    }
    if(model == 533)//FELTZER
    {
    if(GetPlayerMoneyA(playerid) < 7000)
    {
    SendClientMessage(playerid, COLOR_RED, "Enought money");
    SetVehicleToRespawn(vehicleid);
    return 1;
    }
    if(PlayerData[playerid][pcar] == -1)
    {
    SendClientMessage(playerid, COLOR_GREEN, "You buy FELTZER=1");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREEN, "You buy FELTZER=2");
    return 1;
    }
And how you see i do another if(model and now is don't work,player don't get message "You but FELTZER=2 or =1,but it for all cars model what i add,maybe it's need use else or anything thing
Reply


Messages In This Thread
Little problem. - by budelis - 27.07.2011, 14:55
Re: Little problem. - by Davz*|*Criss - 27.07.2011, 15:01
Re: Little problem. - by budelis - 27.07.2011, 16:39
Re: Little problem. - by budelis - 27.07.2011, 18:48
Re: Little problem. - by budelis - 27.07.2011, 20:34
Re: Little problem. - by Pasa - 27.07.2011, 21:57
Re: Little problem. - by AndreT - 27.07.2011, 21:59
Re: Little problem. - by budelis - 29.07.2011, 12:22
Re: Little problem. - by budelis - 29.07.2011, 14:26
Re: Little problem. - by Guest3598475934857938411 - 29.07.2011, 15:35

Forum Jump:


Users browsing this thread: 4 Guest(s)