27.03.2011, 22:33
Hey,
So I have been trying to make my own dealership since most tutorials dont have what I wanted... Anyway this is my first time trying something like this and I need help, this is what I have:
So what I have above is part of my /buycar command so when they type /buycar bobcat they can get that car if they are inside of it. But what I cant get to work is that car to spawn somewhere and then save as their car. How can I make that car theirs and so on. Thanks.
So I have been trying to make my own dealership since most tutorials dont have what I wanted... Anyway this is my first time trying something like this and I need help, this is what I have:
pawn Код:
if(strcmp(x_nr,"bobcat",true) == 0)
{
new newcars = GetPlayerVehicleID(playerid);
if(newcars == Dealerv[6])
{
RemovePlayerFromVehicle(playerid);
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pMoney]-20000;
GivePlayerMoney(playerid, -210000);
SetPlayerPos(playerid, 2131.6851,-1150.2285,24.1789);
TogglePlayerControllable(playerid, 1);
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Incorrect vehicle name");
return 1;
}
}
So what I have above is part of my /buycar command so when they type /buycar bobcat they can get that car if they are inside of it. But what I cant get to work is that car to spawn somewhere and then save as their car. How can I make that car theirs and so on. Thanks.