Jump to content

Bogdan's

Membru
  • Posts

    162
  • Joined

  • Last visited

Everything posted by Bogdan's

  1. PUBLIC: LoadCar() { new arrCoords[31][64]; new strFromFile2[256]; new File: file = fopen("personalcars.cfg", io_read); if (file) { new idx = carsonserver; while (idx < sizeof(CarInfo)) { fread(file, strFromFile2); split(strFromFile2, arrCoords, ','); CarInfo[idx][cModel] = strval(arrCoords[0]); CarInfo[idx][cLocationx] = floatstr(arrCoords[1]); CarInfo[idx][cLocationy] = floatstr(arrCoords[2]); CarInfo[idx][cLocationz] = floatstr(arrCoords[3]); CarInfo[idx][cAngle] = floatstr(arrCoords[4]); CarInfo[idx][cColorOne] = strval(arrCoords[5]); CarInfo[idx][cColorTwo] = strval(arrCoords[6]); strmid(CarInfo[idx][cOwner], arrCoords[7], 0, strlen(arrCoords[7]), 255); strmid(CarInfo[idx][cDescription], arrCoords[8], 0, strlen(arrCoords[8]), 255); CarInfo[idx][cValue] = strval(arrCoords[9]); strmid(CarInfo[idx][cLicense], arrCoords[10], 0, strlen(arrCoords[10]), 255); CarInfo[idx][cOwned] = strval(arrCoords[11]); CarInfo[idx][cLock] = strval(arrCoords[12]); CarInfo[idx][mod1] = strval(arrCoords[13]); CarInfo[idx][mod2] = strval(arrCoords[14]); CarInfo[idx][mod3] = strval(arrCoords[15]); CarInfo[idx][mod4] = strval(arrCoords[16]); CarInfo[idx][mod5] = strval(arrCoords[17]); CarInfo[idx][mod6] = strval(arrCoords[18]); CarInfo[idx][mod7] = strval(arrCoords[19]); CarInfo[idx][mod8] = strval(arrCoords[20]); CarInfo[idx][mod9] = strval(arrCoords[21]); CarInfo[idx][mod10] = strval(arrCoords[22]); CarInfo[idx][mod11] = strval(arrCoords[23]); CarInfo[idx][mod12] = strval(arrCoords[24]); CarInfo[idx][mod13] = strval(arrCoords[25]); CarInfo[idx][mod14] = strval(arrCoords[26]); CarInfo[idx][mod15] = strval(arrCoords[27]); CarInfo[idx][mod16] = strval(arrCoords[28]); CarInfo[idx][mod17] = strval(arrCoords[29]); CarInfo[idx][paintjob] = strval(arrCoords[30]); printf("CarInfo: %d Owner:%s LicensePlate %s",idx,CarInfo[idx][cOwner],CarInfo[idx][cLicense]); idx++; } } return 1; } DINI.
  2. if(!strcmp(cmdtext, "/destroycar", true)) { new vehicleid = GetPlayerVehicleID(playerid); DestroyVehicle(vehicleid); SendClientMessage(playerid,-1,"Comanda executata cu succes!Masina a disparut pentru totdeauna."); CarInfo[thiscar][cOwned] = 0; CarInfo[thiscar][cModel] = 602; CarInfo[thiscar][cColorOne] = 0; CarInfo[thiscar][cColorTwo] = 0; CarInfo[thiscar][cLocationx] = 0.0; CarInfo[thiscar][cLocationy] = 0.0; CarInfo[thiscar][cLocationz] = 0.0; return 1; } Dar o baga la coordonatele 0 0 0 Si owneru masinii nu ii se sterge masina.
  3. Poti inchide... Eu rezolv problema aici,dar cine ma ajuta daca toti sunt dupa bani?
  4. Problema intalnita (descriere): Salutare,am comanda /destroycar toate bune si frumoase,imi distruge masina dar as vrea ca,cand dau /destroycar sa se stearga cu totul masina de pe server.Adica sa nu mai apara in cars.cfg..Cum as putea face asta? Ero(area / rile) / warning-(ul / urile): - Liniile de cod / sursa / script-ul(obligatoriu): if(!strcmp(cmdtext, "/destroycar", true)) { new vehicleid = GetPlayerVehicleID(playerid); DestroyVehicle(vehicleid); SendClientMessage(playerid,-1,"Comanda executata cu succes!Masina a disparut pentru totdeauna."); return 1; } Imagini / Video (optional): Ati incercat sa rezolvati singur?: Da,dar nu merge.
  5. Cum?Mister ai mesaj pe facebook.
  6. Nu primesc,exact cum ai spus tu.Nu primesc nici o eroare.
  7. Problema e ca nu apare nici mesajul acela cu Proprietarul X iti vinde masina... if(strcmp(x_job,"car",true) == 0) { if(CarOffer[playerid] < 999) { if(CarID[playerid] == 0) { return 1; } if(CarID[playerid] != GetPlayerVehicleID(CarOffer[playerid])) { return 1; } if(CarPrice[playerid] == 0 || CarPrice[playerid] > 10000001) { return 1; } if(CarID[playerid] == PlayerInfo[CarOffer[playerid]][pPcarkey]) { } else if(CarID[playerid] == PlayerInfo[CarOffer[playerid]][pPcarkey2]) { } else if(CarID[playerid] == PlayerInfo[CarOffer[playerid]][pPcarkey3]) { } else if(CarID[playerid] == PlayerInfo[CarOffer[playerid]][pPcarkey4]) { } else { SendClientMessage(playerid, COLOR_GREY, " Oferta nu mai este valabila"); return 1; } if(GetPlayerMoney(playerid) >= CarPrice[playerid]) { if(IsPlayerConnected(CarOffer[playerid])) { if(PlayerInfo[playerid][pPcarkey] == 9999) { if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey]) { PlayerInfo[playerid][pPcarkey] = PlayerInfo[CarOffer[playerid]][pPcarkey]; PlayerInfo[CarOffer[playerid]][pPcarkey] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey2]) { PlayerInfo[playerid][pPcarkey] = PlayerInfo[CarOffer[playerid]][pPcarkey2]; PlayerInfo[CarOffer[playerid]][pPcarkey2] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey3]) { PlayerInfo[playerid][pPcarkey] = PlayerInfo[CarOffer[playerid]][pPcarkey3]; PlayerInfo[CarOffer[playerid]][pPcarkey3] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey4]) { PlayerInfo[playerid][pPcarkey] = PlayerInfo[CarOffer[playerid]][pPcarkey4]; PlayerInfo[CarOffer[playerid]][pPcarkey4] = 9999; } else { SendClientMessage(playerid, COLOR_GREY, " Vanzatorul trebuie sa fie in masina !"); return 1; } GetPlayerName(CarOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* Ai cumparat masina pentru $%d de la %s.",CarPrice[playerid],giveplayer); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* %s a cumparat masina pentru $%d.",sendername,CarPrice[playerid]); SendClientMessage(CarOffer[playerid], COLOR_WHITE, string); RemovePlayerFromVehicle(CarOffer[playerid]); TogglePlayerControllable(CarOffer[playerid], 1); GivePlayerMoney(playerid, - CarPrice[playerid]); GivePlayerMoney(CarOffer[playerid], CarPrice[playerid]); strmid(CarInfo[CarID[playerid]][cOwner], sendername, 0, strlen(sendername), 999); printf("%s i-a vandut lui %s vehiculul (%d)%s cu suma de %d.", giveplayer, sendername, CarID[playerid], CarInfo[CarID[playerid]][cDescription], CarPrice[playerid]); //DateProp2(playerid); //DateProp2(CarOffer[playerid]); OnPropUpdate(); OnPlayerUpdateEx(playerid); OnPlayerUpdateEx(CarOffer[playerid]); CarOffer[playerid] = 999; CarID[playerid] = 0; CarPrice[playerid] = 0; GameTextForPlayer(playerid, "~w~Nu uita sa parchezi masina (/park)!", 5000, 3); SendClientMessage(playerid, COLOR_GRAD2, "Felicitari pentru achizitie!"); SendClientMessage(playerid, COLOR_GRAD2, "Scrie /vehiclehelp pentru a vedea comenzile vehiculului!"); return 1; } else if(PlayerInfo[playerid][pPcarkey2] == 9999) { if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey]) { PlayerInfo[playerid][pPcarkey2] = PlayerInfo[CarOffer[playerid]][pPcarkey]; PlayerInfo[CarOffer[playerid]][pPcarkey] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey2]) { PlayerInfo[playerid][pPcarkey2] = PlayerInfo[CarOffer[playerid]][pPcarkey2]; PlayerInfo[CarOffer[playerid]][pPcarkey2] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey3]) { PlayerInfo[playerid][pPcarkey2] = PlayerInfo[CarOffer[playerid]][pPcarkey3]; PlayerInfo[CarOffer[playerid]][pPcarkey3] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey4]) { PlayerInfo[playerid][pPcarkey2] = PlayerInfo[CarOffer[playerid]][pPcarkey4]; PlayerInfo[CarOffer[playerid]][pPcarkey4] = 9999; } else { SendClientMessage(playerid, COLOR_GREY, " Vanzatorul trebuie sa fie in masina !"); return 1; } GetPlayerName(CarOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* Ai cumparat masina pentru $%d de la %s.",CarPrice[playerid],giveplayer); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* %s a cumparat masina pentru $%d.",sendername,CarPrice[playerid]); SendClientMessage(CarOffer[playerid], COLOR_WHITE, string); RemovePlayerFromVehicle(CarOffer[playerid]); TogglePlayerControllable(CarOffer[playerid], 1); GivePlayerMoney(playerid, - CarPrice[playerid]); GivePlayerMoney(CarOffer[playerid], CarPrice[playerid]); strmid(CarInfo[CarOffer[playerid]][cOwner], sendername, 0, strlen(sendername), 999); printf("%s i-a vandut lui %s vehiculul (%d)%s cu suma de %d.", giveplayer, sendername, CarOffer[playerid], CarInfo[CarID[playerid]][cDescription], CarPrice[playerid]); //DateProp2(playerid); //DateProp2(CarOffer[playerid]); OnPropUpdate(); OnPlayerUpdateEx(playerid); OnPlayerUpdateEx(CarOffer[playerid]); CarOffer[playerid] = 999; CarID[playerid] = 0; CarPrice[playerid] = 0; GameTextForPlayer(playerid, "~w~Nu uita sa parchezi masina (/park)!", 5000, 3); SendClientMessage(playerid, COLOR_GRAD2, "Felicitari pentru achizitie!"); SendClientMessage(playerid, COLOR_GRAD2, "Scrie /vehiclehelp pentru a vedea comenzile vehiculului!"); return 1; } else if(PlayerInfo[playerid][pPcarkey3] == 9999) { if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey]) { PlayerInfo[playerid][pPcarkey3] = PlayerInfo[CarOffer[playerid]][pPcarkey]; PlayerInfo[CarOffer[playerid]][pPcarkey] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey2]) { PlayerInfo[playerid][pPcarkey3] = PlayerInfo[CarOffer[playerid]][pPcarkey2]; PlayerInfo[CarOffer[playerid]][pPcarkey2] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey3]) { PlayerInfo[playerid][pPcarkey3] = PlayerInfo[CarOffer[playerid]][pPcarkey3]; PlayerInfo[CarOffer[playerid]][pPcarkey3] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey4]) { PlayerInfo[playerid][pPcarkey3] = PlayerInfo[CarOffer[playerid]][pPcarkey4]; PlayerInfo[CarOffer[playerid]][pPcarkey4] = 9999; } else { SendClientMessage(playerid, COLOR_GREY, " Vanzatorul trebuie sa fie in masina !"); return 1; } GetPlayerName(CarOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* Ai cumparat masina pentru $%d de la %s.",CarPrice[playerid],giveplayer); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* %s a cumparat masina pentru $%d.",sendername,CarPrice[playerid]); SendClientMessage(CarOffer[playerid], COLOR_WHITE, string); RemovePlayerFromVehicle(CarOffer[playerid]); TogglePlayerControllable(CarOffer[playerid], 1); GivePlayerMoney(playerid, - CarPrice[playerid]); GivePlayerMoney(CarOffer[playerid], CarPrice[playerid]); strmid(CarInfo[CarID[playerid]][cOwner], sendername, 0, strlen(sendername), 999); printf("%s i-a vandut lui %s vehiculul (%d)%s cu suma de %d.", giveplayer, sendername, CarID[playerid], CarInfo[CarID[playerid]][cDescription], CarPrice[playerid]); //DateProp2(playerid); //DateProp2(CarOffer[playerid]); OnPropUpdate(); OnPlayerUpdateEx(playerid); OnPlayerUpdateEx(CarOffer[playerid]); CarOffer[playerid] = 999; CarID[playerid] = 0; CarPrice[playerid] = 0; GameTextForPlayer(playerid, "~w~Nu uita sa parchezi masina (/park)!", 5000, 3); SendClientMessage(playerid, COLOR_GRAD2, "Felicitari pentru achizitie!"); SendClientMessage(playerid, COLOR_GRAD2, "Scrie /vehiclehelp pentru a vedea comenzile vehiculului!"); return 1; } else if(PlayerInfo[playerid][pPcarkey4] == 9999) { if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey]) { PlayerInfo[playerid][pPcarkey4] = PlayerInfo[CarOffer[playerid]][pPcarkey]; PlayerInfo[CarOffer[playerid]][pPcarkey] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey2]) { PlayerInfo[playerid][pPcarkey4] = PlayerInfo[CarOffer[playerid]][pPcarkey2]; PlayerInfo[CarOffer[playerid]][pPcarkey2] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey3]) { PlayerInfo[playerid][pPcarkey4] = PlayerInfo[CarOffer[playerid]][pPcarkey3]; PlayerInfo[CarOffer[playerid]][pPcarkey3] = 9999; } else if(GetPlayerVehicleID(CarOffer[playerid]) == PlayerInfo[CarOffer[playerid]][pPcarkey4]) { PlayerInfo[playerid][pPcarkey4] = PlayerInfo[CarOffer[playerid]][pPcarkey4]; PlayerInfo[CarOffer[playerid]][pPcarkey4] = 9999; } else { SendClientMessage(playerid, COLOR_GREY, " Vanzatorul trebuie sa fie in masina !"); return 1; } GetPlayerName(CarOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* Ai cumparat masina pentru $%d de la %s.",CarPrice[playerid],giveplayer); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* %s a cumparat masina pentru $%d.",sendername,CarPrice[playerid]); SendClientMessage(CarOffer[playerid], COLOR_WHITE, string); RemovePlayerFromVehicle(CarOffer[playerid]); TogglePlayerControllable(CarOffer[playerid], 1); GivePlayerMoney(playerid, - CarPrice[playerid]); GivePlayerMoney(CarOffer[playerid], CarPrice[playerid]); strmid(CarInfo[CarID[playerid]][cOwner], sendername, 0, strlen(sendername), 999); printf("%s i-a vandut lui %s vehiculul (%d)%s cu suma de %d.", giveplayer, sendername, CarID[playerid], CarInfo[CarID[playerid]][cDescription], CarPrice[playerid]); //DateProp2(playerid); //DateProp2(CarOffer[playerid]); OnPropUpdate(); OnPlayerUpdateEx(playerid); OnPlayerUpdateEx(CarOffer[playerid]); CarOffer[playerid] = 999; CarID[playerid] = 0; CarPrice[playerid] = 0; GameTextForPlayer(playerid, "~w~Nu uita sa parchezi masina (/park)!", 5000, 3); SendClientMessage(playerid, COLOR_GRAD2, "Felicitari pentru achizitie!"); SendClientMessage(playerid, COLOR_GRAD2, "Scrie /vehiclehelp pentru a vedea comenzile vehiculului!"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Nimeni nu iti vinde un vehicul !"); return 1; } } }
  8. Problema intalnita (descriere): Nu merge /sellcarto scriu /sellcarto si apare mesajul cu ce trebuie sa scriu dar cand scriu deja id-ul playerului nu mai merge. Ero(area / rile) / warning-(ul / urile): - Liniile de cod / sursa / script-ul(obligatoriu): if(strcmp(cmd, "/sellcarto", true) == 0) { if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey4]) { } else { SendClientMessage(playerid, COLOR_GREY, " Nu esti intr-un vehicul."); return 1; } new numeveh[35]; GetPlayerName(playerid, numeveh, sizeof(numeveh)); new ownvehkey = GetPlayerVehicleID(playerid); if(!IsAnOwnableCar(ownvehkey)) { return 1; } if(strcmp(numeveh, CarInfo[ownvehkey][cOwner], true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_LIGHTBLUE, ">>{FFFFFF}SUGESTIE: /sellcarto [IDJucator/PARTEdinNUME] [pret]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(ProxDetectorS(8.0, playerid, giveplayerid)) { if(PlayerInfo[giveplayerid][pPcarkey] == 9999) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_LIGHTBLUE, ">>{FFFFFF}SUGESTIE: /sellto [IDJucator/PARTEdinNUME] [pret]"); return 1; } new price; price = strval(tmp); if(price < 1 || price > 10000000) { SendClientMessage(playerid, COLOR_GREY, " Pretul trebuie sa fie intre $1 si $10000000. "); return 1; } if(PlayerInfo[playerid][pLevel] < 5) { SendClientMessage(playerid, COLOR_GREY, " Trebuie sa ai minim nivel 5. "); return 1; } if(PlayerInfo[giveplayerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GREY, " Jucatorul nu are nivel 3. "); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* I-ai oferit lui %s vehiculul pentru $%d .", giveplayer, price); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Proprietarul vehiculului %s iti ofera vehiculul cu $%d (scrie /accept car) pentru a o cumpara.", sendername, price); SendClientMessage(giveplayerid, COLOR_WHITE, string); CarOffer[giveplayerid] = playerid; CarID[giveplayerid] = ownvehkey; CarPrice[giveplayerid] = price; return 1; } else if(PlayerInfo[giveplayerid][pPcarkey2] == 9999) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_LIGHTBLUE, ">>{FFFFFF}SUGESTIE: /sellto [IDJucator/PARTEdinNUME] [pret]"); return 1; } new price; price = strval(tmp); if(price < 1 || price > 10000000) { SendClientMessage(playerid, COLOR_GREY, " Pretul trebuie sa fie intre $1 si $10000000. "); return 1; } if(PlayerInfo[playerid][pLevel] < 5) { SendClientMessage(playerid, COLOR_GREY, " Trebuie sa ai minim nivel 5. "); return 1; } if(PlayerInfo[giveplayerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GREY, " Jucatorul nu are nivel 3. "); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* I-ai oferit lui %s vehiculul pentru $%d .", giveplayer, price); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Proprietarul vehiculului %s iti ofera vehiculul cu $%d (scrie /accept car) pentru a o cumpara.", sendername, price); SendClientMessage(giveplayerid, COLOR_WHITE, string); CarOffer[giveplayerid] = playerid; CarID[giveplayerid] = ownvehkey; CarPrice[giveplayerid] = price; return 1; } else if(PlayerInfo[giveplayerid][pPcarkey3] == 9999) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_LIGHTBLUE, ">>{FFFFFF}SUGESTIE: /sellto [IDJucator/PARTEdinNUME] [pret]"); return 1; } new price; price = strval(tmp); if(price < 1 || price > 10000000) { SendClientMessage(playerid, COLOR_GREY, " Pretul trebuie sa fie intre $1 si $10000000. "); return 1; } if(PlayerInfo[playerid][pLevel] < 5) { SendClientMessage(playerid, COLOR_GREY, " Trebuie sa ai minim nivel 5. "); return 1; } if(PlayerInfo[giveplayerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GREY, " Jucatorul nu are nivel 3. "); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* I-ai oferit lui %s vehiculul pentru $%d .", giveplayer, price); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Proprietarul vehiculului %s iti ofera vehiculul cu $%d (scrie /accept car) pentru a o cumpara.", sendername, price); SendClientMessage(giveplayerid, COLOR_WHITE, string); CarOffer[giveplayerid] = playerid; CarID[giveplayerid] = ownvehkey; CarPrice[giveplayerid] = price; return 1; } else if(PlayerInfo[giveplayerid][pPcarkey4] == 9999) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_LIGHTBLUE, ">>{FFFFFF}SUGESTIE: /sellto [IDJucator/PARTEdinNUME] [pret]"); return 1; } new price; price = strval(tmp); if(price < 1 || price > 10000000) { SendClientMessage(playerid, COLOR_GREY, " Pretul trebuie sa fie intre $1 si $10000000. "); return 1; } if(PlayerInfo[playerid][pLevel] < 5) { SendClientMessage(playerid, COLOR_GREY, " Trebuie sa ai minim nivel 5. "); return 1; } if(PlayerInfo[giveplayerid][pLevel] < 3) { SendClientMessage(playerid, COLOR_GREY, " Jucatorul nu are nivel 3. "); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* I-ai oferit lui %s vehiculul pentru $%d .", giveplayer, price); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Proprietarul vehiculului %s iti ofera vehiculul cu $%d (scrie /accept car) pentru a o cumpara.", sendername, price); SendClientMessage(giveplayerid, COLOR_WHITE, string); CarOffer[giveplayerid] = playerid; CarID[giveplayerid] = ownvehkey; CarPrice[giveplayerid] = price; return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " Acesta persoana nu este aproape de tine ! "); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Jucator Offline"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " Trebuie sa stai in vehiculul tau pentru al vinde"); return 1; } } Imagini / Video (optional): Ati incercat sa rezolvati singur?: Da,am facut cateva rectificari,dar nu stiu de ce nu merge.
  9. if(listitem==0) { if (GetPlayerMoney(playerid) >= 65000) { GivePlayerMoney(playerid,-65000); //Phoenix //new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); new thiscar = CreateVehicle(603,307.1591,-1481.4534,24.3208,234.5908,0,0,99999999); if(PlayerInfo[playerid][pPcarkey] == -1) { PlayerInfo[playerid][pPcarkey] = thiscar; } else if(PlayerInfo[playerid][pPcarkey2] == -1) { PlayerInfo[playerid][pPcarkey2] = thiscar; } else if(PlayerInfo[playerid][pPcarkey3] == -1) { PlayerInfo[playerid][pPcarkey3] = thiscar; } else { return 1; } CarInfo[thiscar][cOwned] = 1; CarInfo[thiscar][cModel] = 603; CarInfo[thiscar][cColorOne] = 0; CarInfo[thiscar][cColorTwo] = 0; CarInfo[thiscar][cLocationx] = 307.1591; CarInfo[thiscar][cLocationy] = -1481.4534; CarInfo[thiscar][cLocationz] = 24.3208; CarInfo[thiscar][cAngle] = 234.5908; CarInfo[thiscar][cValue] = 65000; CarInfo[thiscar][cLock] = 0; CarInfo[thiscar][paintjob] = -1; PutPlayerInVehicle(playerid,thiscar,0); GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(CarInfo[thiscar][cOwner], sendername, 0, strlen(sendername), 999); PlayerPlayMusic(playerid); GameTextForPlayer(playerid, "~w~Felicitari~n~Nu uita sa o parchezi cu /v park!", 5000, 3); SendClientMessage(playerid, COLOR_GRAD2, "Felicitari ti-ai cumparat o masina noua!"); SendClientMessage(playerid, COLOR_GRAD2, "Scrie /v pentru manualul masini!"); format(CarInfo[thiscar][cDescription], 32, "Phoenix"); OnCarUpdate(); SavePlayerData(playerid); } else { SendClientMessage(playerid, COLOR_WHITE, " Nu ai suficienti bani pentru a cumpara masina aceasta !"); } } Si asa mai departe. Se pare ca am rezolvat cumva. Multumesc de ajutor oricum!
  10. Asta? PUBLIC: OnCarUpdate() { new idx; new File: file2; idx = carsonserver; while (idx < sizeof(CarInfo)) { new coordsstring[256]; format(coordsstring, sizeof(coordsstring), "%d,%f,%f,%f,%f,%d,%d,%s,%s,%d,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n", CarInfo[idx][cModel], CarInfo[idx][cLocationx], CarInfo[idx][cLocationy], CarInfo[idx][cLocationz], CarInfo[idx][cAngle], CarInfo[idx][cColorOne], CarInfo[idx][cColorTwo], CarInfo[idx][cOwner], CarInfo[idx][cDescription], CarInfo[idx][cValue], CarInfo[idx][cLicense], CarInfo[idx][cOwned], CarInfo[idx][cLock], CarInfo[idx][mod1], CarInfo[idx][mod2], CarInfo[idx][mod3], CarInfo[idx][mod4], CarInfo[idx][mod5], CarInfo[idx][mod6], CarInfo[idx][mod7], CarInfo[idx][mod8], CarInfo[idx][mod9], CarInfo[idx][mod10], CarInfo[idx][mod11], CarInfo[idx][mod12], CarInfo[idx][mod13], CarInfo[idx][mod14], CarInfo[idx][mod15], CarInfo[idx][mod16], CarInfo[idx][mod17], CarInfo[idx][paintjob]); if(idx == carsonserver) { file2 = fopen("personalcars.cfg", io_write); } else { file2 = fopen("personalcars.cfg", io_append); } fwrite(file2, coordsstring); idx++; fclose(file2); } return 1; }
  11. Da,am. La OnPlayerStateChange am: new string[256]; new name[MAX_PLAYER_NAME], Float:x,Float:y,Float:z; new newcar = GetPlayerVehicleID(playerid); GetPlayerPos(playerid,x,y,z); GetPlayerName(playerid,name,sizeof(name)); new vehicle = GetPlayerVehicleID(playerid); if(newstate == PLAYER_STATE_DRIVER) { if(IsAnOwnableCar(newcar)) { if(CarInfo[newcar][cOwned]==1) { format(string,sizeof(string),"* Vehiculul privat al jucatorului {ffffff}%s",CarInfo[newcar][cOwner]); SendClientMessage(playerid, COLOR_ORANGE, string); if(PlayerInfo[playerid][pPcarkey] == vehicle) { } else if(PlayerInfo[playerid][pPcarkey2] == vehicle) { } else if(PlayerInfo[playerid][pPcarkey3] == vehicle) { } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GREY, "* Nu detii keyle acestei masini."); } } } } Dar dupa Restart la server nu mai apare ca si cum ar fi masina mea,drept urmare nu apare ca am masina asta. Adica nu apare ca ''Vehiculul privat al jucatorului X"
  12. PUBLIC: LoadCar() { new arrCoords[31][64]; new strFromFile2[256]; new File: file = fopen("personalcars.cfg", io_read); if (file) { new idx = carsonserver; while (idx < sizeof(CarInfo)) { fread(file, strFromFile2); split(strFromFile2, arrCoords, ','); CarInfo[idx][cModel] = strval(arrCoords[0]); CarInfo[idx][cLocationx] = floatstr(arrCoords[1]); CarInfo[idx][cLocationy] = floatstr(arrCoords[2]); CarInfo[idx][cLocationz] = floatstr(arrCoords[3]); CarInfo[idx][cAngle] = floatstr(arrCoords[4]); CarInfo[idx][cColorOne] = strval(arrCoords[5]); CarInfo[idx][cColorTwo] = strval(arrCoords[6]); strmid(CarInfo[idx][cOwner], arrCoords[7], 0, strlen(arrCoords[7]), 255); strmid(CarInfo[idx][cDescription], arrCoords[8], 0, strlen(arrCoords[8]), 255); CarInfo[idx][cValue] = strval(arrCoords[9]); strmid(CarInfo[idx][cLicense], arrCoords[10], 0, strlen(arrCoords[10]), 255); CarInfo[idx][cOwned] = strval(arrCoords[11]); CarInfo[idx][cLock] = strval(arrCoords[12]); CarInfo[idx][mod1] = strval(arrCoords[13]); CarInfo[idx][mod2] = strval(arrCoords[14]); CarInfo[idx][mod3] = strval(arrCoords[15]); CarInfo[idx][mod4] = strval(arrCoords[16]); CarInfo[idx][mod5] = strval(arrCoords[17]); CarInfo[idx][mod6] = strval(arrCoords[18]); CarInfo[idx][mod7] = strval(arrCoords[19]); CarInfo[idx][mod8] = strval(arrCoords[20]); CarInfo[idx][mod9] = strval(arrCoords[21]); CarInfo[idx][mod10] = strval(arrCoords[22]); CarInfo[idx][mod11] = strval(arrCoords[23]); CarInfo[idx][mod12] = strval(arrCoords[24]); CarInfo[idx][mod13] = strval(arrCoords[25]); CarInfo[idx][mod14] = strval(arrCoords[26]); CarInfo[idx][mod15] = strval(arrCoords[27]); CarInfo[idx][mod16] = strval(arrCoords[28]); CarInfo[idx][mod17] = strval(arrCoords[29]); CarInfo[idx][paintjob] = strval(arrCoords[30]); printf("CarInfo: %d Owner:%s LicensePlate %s",idx,CarInfo[idx][cOwner],CarInfo[idx][cLicense]); idx++; } } return 1; }
  13. Cum m-ai ajutat si cu sistemul de /rob nu?Altcineva?
  14. Un UP? Platesc pentru cine ma ajuta!
  15. Problema intalnita (descriere): Dupa ce dau restart la server masinile nu mai sunt pe numele meu,ci sunt free.Dar la /v tot apar ca si cum ar fi ale mele. Ero(area / rile) / warning-(ul / urile): - Liniile de cod / sursa / script-ul(obligatoriu): Spuneti-mi ce sa va dau ca nu stiu. Imagini / Video (optional): - Ati incercat sa rezolvati singur?: Nu stiu de unde ar putea fi problema. Folosesc modul Quit GF.
  16. Da,intra pe b-z**e si vezi,sau pe bu***d.
  17. Problema intalnita (descriere): Salutare,mai am o intrebare si anume stiti ca pe anumite servere din Romania,apesi pe R din masina si se duce la radio automat,cum pot face si eu chestia asta,adica am facut tot alea dar nu am gasit R-ul in Keys de pe wiki asa ca am pus pe alta tasta,imi poate explica cineva cum pot pune Radioul pe R?Care este codul de la R? Ero(area / rile) / warning-(ul / urile): Liniile de cod / sursa / script-ul(obligatoriu): if (PRESSED(KEY_LOOK_RIGHT)) { if (IsPlayerInAnyVehicle(playerid)) { if(IsPlayerInAnyVehicle(playerid))ShowPlayerDialog(playerid, 11221 , DIALOG_STYLE_LIST, "Radio.", "ProFM\nRadio Taraf\nRadio Hit\nRadio Mafia\nRadio Greu de Difuzat\nRadio Lautaru\nRadio Star DJ\nRadio Music \nRadio Fun\nRadio Kiss FM\nOpreste muzica", "Ok", "Cancel"); else SendClientMessage(playerid,0x00FF00AA,"Radio stopped.");StopAudioStreamForPlayer(playerid); } } Momentan functioneaza pe E. Imagini / Video (optional): Ati incercat sa rezolvati singur?:
  18. Da,stocheaza comanda urmatoare totul: new vehid; vehid = GetPlayerVehicleID(playerid); if (strcmp(cmd, "/mycars", true) == 0) { if(IsPlayerConnected(playerid)) { new carkey = PlayerInfo[playerid][pPcarkey]; new carkey2 = PlayerInfo[playerid][pPcarkey2]; new carkey3 = PlayerInfo[playerid][pPcarkey3]; if (PlayerInfo[playerid][pPcarkey] != -1) { format(string, sizeof(string), "1| VehModel:[%s] VehValue:[%d] VehColor1:[%d] VehColor2:[%d] VehLocked:[%d]", CarInfo[carkey][cDescription], CarInfo[carkey][cValue], CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], CarInfo[carkey][cLock]); SendClientMessage(playerid, COLOR_GRAD5,string); } if (PlayerInfo[playerid][pPcarkey2] != -1) { format(string, sizeof(string), "2| VehModel:[%s] VehValue:[%d] VehColor1:[%d] VehColor2:[%d] VehLocked:[%d]", CarInfo[carkey2][cDescription], CarInfo[carkey2][cValue], CarInfo[carkey2][cColorOne], CarInfo[carkey2][cColorTwo], CarInfo[carkey2][cLock]); SendClientMessage(playerid, COLOR_GRAD5,string); } if (PlayerInfo[playerid][pPcarkey3] != -1) { format(string, sizeof(string), "3| VehModel:[%s] VehValue:[%d] VehColor1:[%d] VehColor2:[%d] VehLocked:[%d]", CarInfo[carkey3][cDescription], CarInfo[carkey3][cValue], CarInfo[carkey3][cColorOne], CarInfo[carkey3][cColorTwo], CarInfo[carkey3][cLock]); SendClientMessage(playerid, COLOR_GRAD5,string); } } return 1; } Multumesc frumos de ajutor!Am rezolvat. Comanda corecta: if(strcmp(cmd, "/veh", true) == 0) { new carkey = PlayerInfo[playerid][pPcarkey]; new carkey2 = PlayerInfo[playerid][pPcarkey2]; new carkey3 = PlayerInfo[playerid][pPcarkey3]; new BigString15[1900]; if(PlayerInfo[playerid][pPcarkey] > 1) { format(string, sizeof(string), "{FFFFFF}1. %s\n", CarInfo[carkey][cDescription]); strcat(BigString15, string); } if(PlayerInfo[playerid][pPcarkey2] > 1) { format(string, sizeof(string), "{FFFFFF}2. %s\n", CarInfo[carkey2][cDescription]); strcat(BigString15, string); } if(PlayerInfo[playerid][pPcarkey3] > 1) { format(string, sizeof(string), "{FFFFFF}3. %s\n", CarInfo[carkey3][cDescription]); strcat(BigString15, string); } ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Vehicle Control", BigString15, "Ok",""); return 1; }
  19. nu merge. http://imgur.com/a/t4vh6 Prima poza e cum arata inainte iar a doua e cum arata acum.
  20. Problema intalnita (descriere): Salutare,deci am facut comanda /v(de la 0) dar nu imi dau seama ce functii trebuie sa folosesc pentru a denumi masina. Ero(area / rile) / warning-(ul / urile): D:\Vlad\Server\gamemodes\Quit.pwn(34362) : warning 202: number of arguments does not match definition D:\Vlad\Server\gamemodes\Quit.pwn(34366) : warning 202: number of arguments does not match definition D:\Vlad\Server\gamemodes\Quit.pwn(34370) : warning 202: number of arguments does not match definition Liniile de cod / sursa / script-ul(obligatoriu): if(strcmp(cmd, "/veh", true) == 0) {; new BigString15[1900]; if(PlayerInfo[playerid][pPcarkey] > 1) { strcat(BigString15, "{FFFFFF}1. %s\n", 1900, PlayerInfo[playerid][pPcarkey]);//error 1 } if(PlayerInfo[playerid][pPcarkey2] > 1) { strcat(BigString15, "{FFFFFF}2. %s\n", 1900, PlayerInfo[playerid][pPcarkey2]);//error 2 } if(PlayerInfo[playerid][pPcarkey3] > 1) { strcat(BigString15, "{FFFFFF}3. %s\n", 1900, PlayerInfo[playerid][pPcarkey3] );//error 3 } ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Vehicle Control", BigString15, "Ok",""); return 1; } Imagini / Video (optional): Ati incercat sa rezolvati singur?: Da am incercat sa schimb cu CarInfo[carkey][cDescription] CarInfo[carkey2][cDescription] CarInfo[carkey3][cDescription] Dar nu mi-a iesit tot aceleasi warninguri imi dau.Ma puteti ajuta? Mentionez ca gamemode-ul este Quit GF v 0.0.0.8
  21. Drept dovada ca esti neserios. Daca voiai mai multe mape puteai specifica atunci cand ti-am facut-o si ti-am dat-o! Nu acum dupa 1 luna de zile cand te-am cautat atunci te-am lasat asa timp de o luna si acum te trezesti ca ''Eh nu ii fac eu lu tampitu asta ca cine e el sa ma traga la raspundere pentru o mapa..'' Pana mea,ai vrut ori platesti ori imi faci scriptul.
  22. Observ domnule cum gata lasi tot. Incerci sa o dai cotita acum Poza din 9 Februarie (miercuri 1 luna) de cand a zis ca imi face scriptul si ca nu m-a uitat. - 06.03 - L-am contactat pe facebook si uitati ce imi zice,drept dovada ca nu este de incredere+ nu se tine de cuvant. Eu aveam incredere in tine,dar vad ca nu se poate.Nesimtirea e mare mai ales la un pustan de 16 ani. Naspa ca aveti asemenea specimen in staff,va face de ras.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.