Problem v buy cars
#1

Hey.
I have a problem.
I want to solve the problem together, so when buying a car gives me my money back, I want to do when you get the money to buy the car permanently.
Can you help me?
This command them:
Quote:

else if(strcmp(x_nr,"buy",true) == 0)
{
new idcar = GetPlayerVehicleID(playerid);
if(IsAnOwnableCar(idcar))
{
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_GREY, "Trebuie sa ai level 3 sa poti cumpara o masina!");
return 1;
}
if(CarInfo[idcar][cOwned]==1)
{
SCM(playerid, COLOR_2RED, "Aceasta masina are deja alt proprietar.");
return 1;
}
if(PlayerInfo[playerid][pPcheiemasina] == 999)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue])
{
if(PlayerInfo[playerid][pPcheiemasina] == 999) { PlayerInfo[playerid][pPcheiemasina] = idcar; }
else { return 1; }
CarInfo[idcar][cOwned] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);
GivePlayerMoney(playerid,-CarInfo[idcar][cValue]);
PlayerPlayMusic(playerid);
GameTextForPlayer(playerid, "~w~Felicitari pentru noua achizitie!~n~Sa o stapaniti sanatos!", 5000, 3);
SendClientMessage(playerid, COLOR_2RED, "Felicitari pentru noua masina achizitionata");
SendClientMessage(playerid, COLOR_YELLOW, "Daca nu stii comenzi, tasteaza /v");
SendClientMessage(playerid, COLOR_1BLUE, "Iti poti parca masina tastand /v park !");
OnCarUpdate();
TogglePlayerControllable(playerid, 1);
return 1;
}
else
{
SCM(playerid, COLOR_2RED, "Nu ai destui bani! ");
return 1;
}
}
}
else if(PlayerInfo[playerid][pPcheiemasina2] == 999)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue])
{
if(PlayerInfo[playerid][pPcheiemasina2] == 999) { PlayerInfo[playerid][pPcheiemasina2] = idcar; }
else { return 1; }
CarInfo[idcar][cOwned] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);
GivePlayerMoney(playerid,-CarInfo[idcar][cValue]);
PlayerPlayMusic(playerid);
GameTextForPlayer(playerid, "~w~Felicitari pentru noua achizitie!~n~Sa o stapaniti sanatos!", 5000, 3);
SendClientMessage(playerid, COLOR_2RED, "Felicitari pentru noua masina achizitionata");
SendClientMessage(playerid, COLOR_YELLOW, "Daca nu stii comenzi, tasteaza /v");
SendClientMessage(playerid, COLOR_1BLUE, "Iti poti parca masina tastand /v park !");
OnCarUpdate();
TogglePlayerControllable(playerid, 1);
return 1;
}
else
{
SCM(playerid, COLOR_2RED, "Nu ai destui bani! ");
return 1;
}
}
}
else
{
SCM(playerid, COLOR_2RED, "Ai deja 2 masini !");
return 1;
}
}
}

Reply
#2

Nobody knows I have this problem? One suggestion at least something?
Reply
#3

Why dont you just download an vehicle system,sorry but i cannot understand anything in this mess (Non-english is a mess for me)
Reply
#4

Geohareas I double dare you to insult my language again.
Please shut your mouth. You are telling everybody to use sscanf even if it has no thing to do with it and you call yourself a scripter. He asked for a fix, NOT A DOWNLOAD. He isn't lazy like you.

Sorry for bump but couldnt resist.

Try checking GivePlayerMoney around your script, it might be some problem, I don't see one.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)