29.09.2016, 18:37
This is the code
The problem is that when I type the command this shows up intead of the car...
http://imgur.com/a/vkiAm
Код:
CMD:buyvehicle(playerid,params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); new string[128]; if(PlayerInfo[playerid][pLevel] < 5) return SendClientMessage(playerid, COLOR_WHITE, "{0077ED}Server: {FFFFFF}Pentru a va cumpara o {0077ED}masina personala {FFFFFF}va trebuie level 5."); if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid, TEAM_AZTECAS_COLOR, "{0077ED}Server: {FFFFFF}Nu puteti folosi aceasta comanda deoarece aveti wanted."); if(!PlayerToPoint(3.0,playerid,326.2255,-1515.1509,36.0325)) return SendClientMessage(playerid, COLOR_WHITE, "{0077ED}Server: {FFFFFF}Nu sunteti la {0077ED}dealership {FFFFFF}pentru a va achizitiona o masina."); if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "{0077ED}Server: {FFFFFF}Pentru a va cumpara o {0077ED}masina {FFFFFF}trebuie sa coborati din {0077ED}masina {FFFFFF}actuala."); TogglePlayerControllable(playerid, 0); SetPlayerVirtualWorld(playerid,playerid+1); SetPlayerPos(playerid,326.2255,-1515.1509,36.0325); SetPlayerCameraPos(playerid,382.3192,-1516.2902,32.6312); SetPlayerCameraLookAt(playerid,389.2411,-1523.2091,32.2663); DealerID[playerid] = 1; VehicleDealer[playerid] = CreateVehicle(DSModels[DealerID[playerid]][dModel],389.2411,-1523.2091,32.2663,DSAngle[playerid],1,1,-1); SetVehicleVirtualWorld(VehicleDealer[playerid],playerid); SelectTextDraw(playerid, 0xFF0000FF); PlayerTextDrawShow(playerid,DSBox); PlayerTextDrawShow(playerid,DSInfo); PlayerTextDrawShow(playerid,DSBuy); PlayerTextDrawShow(playerid,DSCancel); PlayerTextDrawShow(playerid,DSPrev); PlayerTextDrawShow(playerid,DSNext); PlayerTextDrawSetPreviewModel(playerid, DSModel, DSModels[DealerID[playerid]][dModel]); PlayerTextDrawSetPreviewRot(playerid, DSModel, 0.0, 0.0, DSAngle[playerid] + 90, 1.0); PlayerTextDrawShow(playerid,DSModel); format(string,sizeof(string),"Name: ~g~~h~~h~%s",aVehicleNames[DSModels[DealerID[playerid]][dModel]-400]); PlayerTextDrawSetString(playerid,DSName,string); PlayerTextDrawShow(playerid,DSName); format(string,sizeof(string),"Price: ~g~~h~~h~$%s",FormatNumber(DSModels[DealerID[playerid]][dPrice])); PlayerTextDrawSetString(playerid,DSPrice,string); PlayerTextDrawShow(playerid,DSPrice); format(string,sizeof(string),"Stock: ~g~~h~~h~%d",DSModels[DealerID[playerid]][dStock]); PlayerTextDrawSetString(playerid,DSStock,string); PlayerTextDrawShow(playerid,DSStock); InDealer[playerid] = 1; return 1; }
http://imgur.com/a/vkiAm