Car dealership system - Need help
#1

Hi!
I need a little help with my car dealership system.
If a player buys a car, I want t he car to spawn, not only write it to mysql, but to make the car spawn, I have to get it to select only the car, the player buyed and spawn that one, but I don't know, how to do it.

The code:
pawn Код:
CMD:sultan(playerid, params[])
{
    new string[555], omanikunimi[MAX_PLAYER_NAME];
    if(PlayerInfo[playerid][AutoV6ti] == 255)
    {
        GetPlayerName(playerid, omanikunimi, sizeof(omanikunimi));
        format(string, 555, "INSERT INTO `autod` (autoid, myygis, omanik, v2rv1, v2rv2, pargitudX, pargitudY, pargitudZ, parkimisangle, model, poesmyygis) VALUES ('5', '0', '%s', '1', '1', '-785.3877', '2753.9294', '45.2800', '235.9695', '411', '0')", omanikunimi);
        mysql_query(string);
    }
    else
    {
        SendClientMessage(playerid, punane, "U've already got a car!");
    }
    return 1;
}

((Translated frome Estonian ))
Reply


Messages In This Thread
Car dealership system - Need help - by tsonn1 - 11.12.2012, 17:24
Re: Car dealership system - Need help - by DaRk_RaiN - 11.12.2012, 17:32
Re: Car dealership system - Need help - by tsonn1 - 11.12.2012, 17:56
Re: Car dealership system - Need help - by tsonn1 - 12.12.2012, 17:42
Re: Car dealership system - Need help - by tsonn1 - 13.12.2012, 17:14

Forum Jump:


Users browsing this thread: 1 Guest(s)