19.11.2012, 07:19
Hey.
So I have a problem in their cars.
When I do not get in the show owner's name.
We changed the way you buy with dialogue and everything goes not only shows me the name of the owner.

Look here the system you "v buy":
And dialogue should be checked if:
So everything works correctly only shows me not the car owners name.
So I have a problem in their cars.
When I do not get in the show owner's name.
We changed the way you buy with dialogue and everything goes not only shows me the name of the owner.

Look here the system you "v buy":
Quote:
if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish {// 38 / 49 / 56 = SS new newcar = GetPlayerVehicleID(playerid); TelePos[playerid][0] = 0.0; TelePos[playerid][1] = 0.0; if(IsAnOwnableCar(newcar)) { if(CarInfo[newcar][cOwned]==0) { new str[650]; format(str,650,""color_red"\t\t\t\tPersonal Car:\n\n"); format(str,650,"%s"wh"• Aceasta aste o masina personala.\n",str); format(str,650,"%s"wh"• Nu o puteti coduce deoarece nu aveti chei la ea.\n",str); format(str,650,"%s"wh"• Daca doriti sa o achizitionati nu trebuie decat sa apasati pe butonul buy.\n",str); format(str,650,"%s"wh"• Daca nu doriti sa o cumparati va rugam sa apasati pe butonul close.\n\n",str); format(str,650,"%s"color_red"\t\t\t\tInfo Car:\n",str); format(str,650,"%s"wh"• Pret: "color_green"%d$\n",str,CarInfo[newcar][cValue]); format(str,650,"%s"wh"• Marca: "color_green"%s\n",str,CarInfo[newcar][cDescription]); format(str,650,"%s"wh"• Propietar: "color_green"%s\n",str,CarInfo[newcar][cOwner]); ShowPlayerDialog( playerid, 674, DIALOG_STYLE_MSGBOX, " ", str, "Buy", "Close" ); } if(CarInfo[newcar][cOwned]>=1) { format(string,sizeof(string),"This car is owned by %s",CarInfo[newcar][cOwner]); SCM(playerid, COLOR_BLUE, string); /*if(keycar != vehicle) { RemovePlayerFromVehicle(playerid); SCM(playerid, COLOR_GREY, "You don't have a key of this vehicle"); }*/ if(PlayerInfo[playerid][pPcarkey] == vehicle) { } else if(PlayerInfo[playerid][pPcarkey2] == vehicle) { } else if(PlayerInfo[playerid][pPcarkey3] == vehicle) { } else { if(PlayerInfo[playerid][pAdmin] >= 5 && AdminDuty[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, " You can drive this car because you are admin on duty !"); } else { //RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GREY, "You don't have a key of this vehicle"); } } } } |
And dialogue should be checked if:
Quote:
if(dialogid == 674) { if(response) { if(IsAnOwnableCar(idcar)) { if(PlayerInfo[playerid][pLevel] < 2) { RemovePlayerFromVehicle(playerid); SCM(playerid, COLOR_GREY, "Pentru a iti cumpara o masina personala ai nevoie de level 2 !"); return 1; } if(PlayerInfo[playerid][pPcarkey] == 999) { } else if(PlayerInfo[playerid][pPcarkey2] == 999) { } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GREY, " Ai deja 2 masini"); return 1; } if(CarInfo[idcar][cOwned]==1) { RemovePlayerFromVehicle(playerid); SCM(playerid, COLOR_GREY, "Someone already owns this car"); return 1; } if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue]) { if(PlayerInfo[playerid][pPcarkey] == 999) { PlayerInfo[playerid][pPcarkey] = idcar; } else if(PlayerInfo[playerid][pPcarkey2] == 999) { PlayerInfo[playerid][pPcarkey2] = idcar; } else if(PlayerInfo[playerid][pPcarkey3] == 999) { PlayerInfo[playerid][pPcarkey3] = idcar; } else { return 1; } CarInfo[idcar][cOwned] = 1; strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999); GivePlayerMoney(playerid,-CarInfo[idcar][cValue]); PlayerPlayMusic(playerid); new str[300]; format(str,300,""color_red"\t\t\t\tInformatii:\n\n \n"); format(str,300,"%s"wh"Ati achizitionat o masina marca "color_yellow"%s "wh"la un pret de "color_green"%d$.\n",str,CarInfo[idcar][cDescription],CarInfo[idcar][cValue]); format(str,300,"%s"wh"Pentru mai multe comenzii de utilizare a masinii folositi /v help.\n",str); ShowPlayerDialog( playerid, 675, DIALOG_STYLE_MSGBOX, " ", str, "Close", "" ); OnPropUpdate(); OnPlayerUpdateEx(playerid); TogglePlayerControllable(playerid, 1); return 1; } else { RemovePlayerFromVehicle(playerid); SCM(playerid, COLOR_GREY, " You don't have enough cash with you ! "); return 1; } } } else { RemovePlayerFromVehicle(playerid); SCM(playerid, COLOR_WHITE, "O zi buna in continuare."); return true ; } } |