public CarSelect(playerid) { if(IsPlayerConnected(playerid)) { if(BuyCar[playerid] == true) { new string[128]; new ime[24]; new Keys, ud, lr; GetPlayerKeys(playerid, Keys, ud, lr); GetPlayerName(playerid, ime, sizeof(ime)); if(lr > 0) { AutoModel++; if(AutoModel > NUMBER_OFSELLED_MODELS-1) {AutoModel = 0;} DestroyVehicle(IzlozbenoVozilo); IzlozbenoVozilo = CreateVehicle(Modeli_vozila[AutoModel][0], 1129.2640,-1454.3809,15.7969,181.4425, Mboja[0], Mboja[1], 30000); format(string,sizeof(string),"~h~~h~~b~Cjena: %d~n~~n~~h~~h~~y~< ~g~dalje ~h~~h~~y~>",Modeli_vozila[AutoModel][1]); TextDrawSetString(MotoTextDraw[playerid],string); } else if(lr < 0) { AutoModel--; if (AutoModel < 0) {AutoModel = BROJ_PRODAJNIH_MODELA-1;} DestroyVehicle(IzlozbenoVozilo); IzlozbenoVozilo = CreateVehicle(Modeli_vozila[AutoModel][0], 1129.2640,-1454.3809,15.7969,181.4425, Mboja[0], Mboja[1], 30000); format(string,sizeof(string),"~h~~h~~b~Cjena: %d~n~~n~~h~~h~~y~< ~g~prethodno ~h~~h~~y~>",Modeli_vozila[AutoModel][1]); TextDrawSetString(MotoTextDraw[playerid],string); } else if(Keys & KEY_SECONDARY_ATTACK) { if(PlayerInfo[playerid][pCar1] == 255 || PlayerInfo[playerid][pCar2] == 255 || PlayerInfo[playerid][pCar1] == 255 && PlayerInfo[playerid][pCar2] == 255) { if(GetPlayerMoney(playerid) >= Modeli_vozila[AutoModel][1]) { for(new i = 1; i < sizeof(Vozila); i++ ) { if(Vozila[i][mX] == 0 && Vozila[i][mY] == 0 && Vozila[i][mZ] == 0 && Vozila[i][mKoristen] == 0) { // vozilo RESET KLJUCA PlayerInfo[playerid][pCar1] = GetMyCar1(playerid); //auto 1 PlayerInfo[playerid][pCar2] = GetMyCar2(playerid); //auto 2 if(PlayerInfo[playerid][pCar1] == 255 && PlayerInfo[playerid][pCar2] == 255) {PlayerInfo[playerid][pCar1] = i; Vozila[i][mBroj] = 1;} else if(PlayerInfo[playerid][pCar2] == 255 && PlayerInfo[playerid][pCar1] != 255) {PlayerInfo[playerid][pCar2] = i; Vozila[i][mBroj] = 2;} else if(PlayerInfo[playerid][pCar2] != 255 && PlayerInfo[playerid][pCar1] == 255) {PlayerInfo[playerid][pCar1] = i; Vozila[i][mBroj] = 1;} PlayerInfo[playerid][pMainKey] = i; SendClientMessage(playerid, COLOR_GREEN, "Kupili ste vozilo! Za pomoc koriste /vehhelp !"); GivePlayerMoney(playerid,-Modeli_vozila[AutoModel][1]); Vozila[i][mKoristen] = 1; Vozila[i][mModel] = Modeli_vozila[AutoModel][0]; Vozila[i][mX] = 1106.5691; Vozila[i][mY] = -1428.4077; Vozila[i][mZ] = 16.0969; Vozila[i][mA] = 265.0799; Vozila[i][mpBoja] = Mboja[0]; Vozila[i][mdBoja] = Mboja[1]; Vozila[i][mZakljucan] = 0; strmid(Vozila[i][mVlasnik], ime, 0, strlen(ime), 999); TogglePlayerControllable(playerid, 1); Vozila[i][mOsobno] = CreateVehicle(Modeli_vozila[AutoModel][0], Vozila[i][mX],Vozila[i][mY],Vozila[i][mZ],Vozila[i][mA], Vozila[i][mpBoja], Vozila[i][mdBoja], 30000); KillTimer(Mtimer[playerid]); KupnjaVozila[playerid] = false; HMotoText(playerid); SetCameraBehindPlayer(playerid); UpdateVozilo(i); break; } } } else { format(string,sizeof(string),"Nemas dosta novaca! Ovo vozilo stoji %d dolara!",Modeli_vozila[AutoModel][1]); SendClientMessage(playerid,COLOR_LIGHTRED,string); } } else { SendClientMessage(playerid,COLOR_LIGHTRED,"Vec imate vozilo!"); } } else if (Keys & KEY_HANDBRAKE || Keys & KEY_JUMP ) { KillTimer(Mtimer[playerid]); TogglePlayerControllable(playerid, 1); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odustali ste od kupnje vaseg vozila..."); KupnjaVozila[playerid] = false; HMotoText(playerid); SetCameraBehindPlayer(playerid); } } } return 1; }
No-one will just do it for you unless you pay them, we are here to help you learn how to script, not script for you. So then the question becomes, what have you tried already? What other examples and bits of documentation have you looked at already to show you the basics of what to do? If, having looked at those bits and pieces, you are still confused about something, what is that thing you are stuck on? That's where we can help out and point you in the right direction, possibly by better explaining some part of existing code. Not just doing it all for you - then you don't learn anything from the process and will need us to just do the next bit of code for you as well, and the bit after etc because you never learn anything from it.
On the other hand, you could just hire a scripter (and no, not me). |
Yes man but I'm a beginer in pawno and i really need help for this :/ PLESAE do it for me
![]() |