Jump to content

HPQ123

Membru
  • Posts

    420
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by HPQ123

  1. Salutare , mi-am facut si eu un server de SA-MP si am luat de pe acest forum un GAMEMODE... Si cand vreau sa intru pe server mi se da kick la 3 warnig imgur: https://imgur.com/a/ImJ1ERu
  2. CMD:sellcarto(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(PlayerInfo[playerid][pPcarkey] == 0 && PlayerInfo[playerid][pmotokey] == 0 && PlayerInfo[playerid][phelikey] == 0 && PlayerInfo[playerid][pprcarkey] == 0 && PlayerInfo[playerid][pprcarkey2] == 0 && PlayerInfo[playerid][pPPluscarkey] == 0 && PlayerInfo[playerid][pPPluscarkey2] == 0) return SendClientMessage(playerid,COLOR_WHITE,"{FFB870}You do not have a vehicle."); new id,price,sendername[30],giveplayer[30],VehI = OwnedVeh(GetPlayerVehicleID(playerid)),other[128]; if(sscanf(params, "uiS(NULL)", id,price,other)) return SCM(playerid,COLOR_WHITE,"{FF9900}Scrie: {33CCFF}/sellcarto <Name/Playerid> <price>"); if(strcmp(other, "NULL", true)) return SCM(playerid,COLOR_WHITE,"Nu folosi spatii in pret."); if(id == playerid) return SendClientMessage(playerid,COLOR_WHITE,"Nu iti poti vinde masina singur."); if(price < 1 || price > 500000000) return SendClientMessage(playerid, COLOR_GREY, "{FFB870}Price not lower then 1 and not higher then $500,000,000."); new vid = GetPlayerVehicleID(playerid); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Nu esti in masina personala."); if(vid != personalcar[0][playerid] && vid != personalcar[1][playerid] && vid != personalcar[2][playerid] && vid != personalcar[3][playerid] && vid != personalcar[4][playerid] && vid != personalcar[5][playerid]) return SendClientMessage(playerid, COLOR_WHITE, "Nu esti in masina personala."); if(GetPlayerCash(id) < price) return SCM(playerid,COLOR_WHITE,"{FFB870}This player don't have money needed."); if(PlayerInfo[playerid][pLevel] < 3) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You don't have level 3."); if(PlayerInfo[id][pLevel] < 3) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}That player doesn't have level 3."); if(VehI != PlayerInfo[playerid][pPcarkey] && VehI != PlayerInfo[playerid][pmotokey] && VehI != PlayerInfo[playerid][pprcarkey] && VehI != PlayerInfo[playerid][pprcarkey2] && VehI != PlayerInfo[playerid][pPPluscarkey] && VehI != PlayerInfo[playerid][pPPluscarkey2]) return SendClientMessage(playerid, COLOR_WHITE, "This is not your car."); GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(id, giveplayer, sizeof(giveplayer)); if(IsPlayerConnected(id)) { if(IsPlayerInRangeOfPlayer(playerid, id, 5.0)) { new vehh = GetPlayerVehicleID(playerid),string[256]; if(vehh == personalcar[0][playerid]) { primesccar[id] = 1; CarID[id] = OwnedVeh(personalcar[0][playerid]); } if(vehh == personalcar[1][playerid]) { primesccar[id] = 2; CarID[id] = OwnedVeh(personalcar[1][playerid]); } if(vehh == personalcar[2][playerid]) { primesccar[id] = 3; CarID[id] = OwnedVeh(personalcar[2][playerid]); } if(vehh == personalcar[3][playerid]) { primesccar[id] = 4; CarID[id] = OwnedVeh(personalcar[3][playerid]); } if(vehh == personalcar[4][playerid]) { primesccar[id] = 5; CarID[id] = OwnedVeh(personalcar[4][playerid]); } if(vehh == personalcar[5][playerid]) { primesccar[id] = 6; CarID[id] = OwnedVeh(personalcar[5][playerid]); } new vehhh = OwnedVeh(GetPlayerVehicleID(playerid)); if(vehhh == PlayerInfo[playerid][pPcarkey]) { cartype[id] = 1; } if(vehhh == PlayerInfo[playerid][pmotokey]) { cartype[id] = 2; } if(vehhh == PlayerInfo[playerid][pprcarkey]) { cartype[id] = 3; } if(vehhh == PlayerInfo[playerid][pprcarkey2]) { cartype[id] = 4; } if(vehhh == PlayerInfo[playerid][pPPluscarkey]) { cartype[id] = 5; } if(vehhh == PlayerInfo[playerid][pPPluscarkey]) { cartype[id] = 6; } ofercar[id] = playerid; carprice[id] = price; format(string, sizeof(string), "* You have offered your car(%s) to %s(%d) for $%s.", CarInfo[vehhh][cDescription],giveplayer,id,FormatNumber(price)); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string), "* %s offered his car(%s) to you for $%s (type /accept vehicle %d) to buy.", sendername, CarInfo[vehhh][cDescription], FormatNumber(price),playerid); SendClientMessage(id, COLOR_GREEN, string); } else return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}Player is not near you."); } return 1; }
  3. CMD:sellcar(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); return cmd_selltods(playerid, params); } CMD:vehicles(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(PlayerInfo[playerid][pPcarkey] == 0 && PlayerInfo[playerid][pmotokey] == 0 && PlayerInfo[playerid][phelikey] == 0 && PlayerInfo[playerid][pprcarkey] == 0 && PlayerInfo[playerid][pprcarkey2] == 0 && PlayerInfo[playerid][pPPluscarkey] == 0 && PlayerInfo[playerid][pPPluscarkey2] == 0) return SendClientMessage(playerid,COLOR_WHITE,"{FFB870}You do not have a vehicle."); new sendername[25],name[100]; GetPlayerName(playerid,sendername,sizeof(sendername)); format(name,sizeof(name),"** %s's vehicles **",sendername); SCM(playerid,COLOR_TUTORIAL,name); if(PlayerInfo[playerid][pPcarkey] != 0) { new string[356],carid = PlayerInfo[playerid][pPcarkey],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string,sizeof(string),"Vehicle 1: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); SCM(playerid,COLOR_GRAD1,string); } if(PlayerInfo[playerid][pmotokey] != 0) { new string[356],carid = PlayerInfo[playerid][pmotokey],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string,sizeof(string),"Vehicle 2: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); SCM(playerid,COLOR_GRAD1,string); } if(PlayerInfo[playerid][pprcarkey] != 0) { new string[356],carid = PlayerInfo[playerid][pprcarkey],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string,sizeof(string),"Premium Vehicle 1: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); SCM(playerid,COLOR_GRAD4,string); } if(PlayerInfo[playerid][pprcarkey2] != 0) { new string[356],carid = PlayerInfo[playerid][pprcarkey2],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string,sizeof(string),"Premium Vehicle 2: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); SCM(playerid,COLOR_GRAD4,string); } if(PlayerInfo[playerid][pPPluscarkey] != 0) { new string[356],carid = PlayerInfo[playerid][pPPluscarkey],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string,sizeof(string),"Plus Vehicle 1: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); SCM(playerid,COLOR_GRAD4,string); } if(PlayerInfo[playerid][pPPluscarkey2] != 0) { new string[356],carid = PlayerInfo[playerid][pPPluscarkey2],locked[6]; if(CarInfo[carid][cLock] == 1) { locked = "Yes"; } else { locked = "No"; } format(string,sizeof(string),"Plus Vehicle 2: Model:[%s] Locked:[%s] KM:[%.0f] TD:[%d] Insurance:[%d] InsuranceP:[%d] Value:[%s]",CarInfo[carid][cDescription],locked,CarInfo[carid][cKM],CarInfo[carid][cTimed],CarInfo[carid][cInsurancecar],CarInfo[carid][cInscarprice],FormatNumber(CarInfo[carid][cValue])); SCM(playerid,COLOR_GRAD4,string); } SCM(playerid,COLOR_TUTORIAL,"__________________________"); return 1; }
  4. CMD:buycar(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_WHITE,"{FFB870}Please get out of the car."); if(IsPlayerInRangeOfPoint(playerid, 7.0, 328.3534,-1513.1687,36.0391)) { if(PlayerInfo[playerid][pLevel] < 3) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You need to be level 3 to buy a vehicle."); BuyCar[playerid] = -1; ShowPlayerDialog(playerid,DIALOG_CARBUY, DIALOG_STYLE_LIST, "Buy a car", "Cheap cars\nRegular cars\nExpensive cars\nPremium cars", "Select", "Close"); } else return SCM(playerid,COLOR_WHITE,"{FFB870}You are not the place where you can buy a car."); return 1; } CMD:setcar(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 5) return SCM(playerid,COLOR_ERROR, AdminOnly); new model[10],test,tableid,string[64],car[30]; if(sscanf(params, "s[10]is[30]",model,test,car)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/setcar <Stock/Price> <Ammount> <Car Name>"); tableid = MySQLCheckCar(car)+1; if(tableid == 0) return SCM(playerid,COLOR_WHITE,"{FFB870}Invalid car name."); if(strcmp(model,"stock",true) == 0) { Stock[tableid][vStock] = test; format(string,sizeof(string),"You set the stock to %d for car %s.",test,car); SCM(playerid,COLOR_WHITE,string); mysql_format(SQL,string, sizeof(string), "UPDATE stock SET Stock='%d' WHERE `ID`='%d'", Stock[tableid][vStock], tableid); mysql_tquery(SQL,string,"",""); return 1; } if(strcmp(model,"price",true) == 0) { Stock[tableid][vPrice] = test; format(string,sizeof(string),"You set the price to %s for car %s.",FormatNumber(test),car); SCM(playerid,COLOR_WHITE,string); mysql_format(SQL,string, sizeof(string), "UPDATE stock SET `Price`='%d' WHERE `ID`='%d'", Stock[tableid][vPrice], tableid); mysql_tquery(SQL,string,"",""); return 1; } } return 1; } CMD:v(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); new masina[456], masina1[456]; if(PlayerInfo[playerid][pPcarkey] != 0) { if(personalcar[0][playerid] != 0) { format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPcarkey]][cDescription]); strcat(masina, masina1); } else { format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPcarkey]][cDescription]); strcat(masina, masina1); } } else { format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n"); strcat(masina, masina1); } if(PlayerInfo[playerid][pmotokey] != 0) { if(personalcar[1][playerid] != 0) { format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pmotokey]][cDescription]); strcat(masina, masina1); } else { format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pmotokey]][cDescription]); strcat(masina, masina1); } } else { format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n"); strcat(masina, masina1); } if(PlayerInfo[playerid][pprcarkey] != 0) { if(personalcar[2][playerid] != 0) { format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey]][cDescription]); strcat(masina, masina1); } else { format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey]][cDescription]); strcat(masina, masina1); } } else if(PlayerInfo[playerid][pprcarkey] == 0 && PlayerInfo[playerid][pPremiumAccount] > 0) { format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n"); strcat(masina, masina1); } if(PlayerInfo[playerid][pprcarkey2] != 0) { if(personalcar[3][playerid] != 0) { format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey2]][cDescription]); strcat(masina, masina1); } else { format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pprcarkey2]][cDescription]); strcat(masina, masina1); } } else if(PlayerInfo[playerid][pprcarkey2] == 0 && PlayerInfo[playerid][pPremiumAccount] > 0) { format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n"); strcat(masina, masina1); } if(PlayerInfo[playerid][pPPluscarkey] != 0) { if(personalcar[4][playerid] != 0) { format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey]][cDescription]); strcat(masina, masina1); } else { format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey]][cDescription]); strcat(masina, masina1); } } else if(PlayerInfo[playerid][pPPluscarkey] == 0 && PlayerInfo[playerid][pPlusSlot1] > 0) { format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n"); strcat(masina, masina1); } if(PlayerInfo[playerid][pPPluscarkey2] != 0) { if(personalcar[5][playerid] != 0) { format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey2]][cDescription]); strcat(masina, masina1); } else { format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",CarInfo[PlayerInfo[playerid][pPPluscarkey2]][cDescription]); strcat(masina, masina1); } } else if(PlayerInfo[playerid][pPPluscarkey2] == 0 && PlayerInfo[playerid][pPlusSlot2] > 0) { format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n"); strcat(masina, masina1); } if(PlayerInfo[playerid][pPcarkey] == 0 && PlayerInfo[playerid][pmotokey] == 0 && PlayerInfo[playerid][pprcarkey] == 0 && PlayerInfo[playerid][pprcarkey2] == 0 && PlayerInfo[playerid][pPPluscarkey] == 0 && PlayerInfo[playerid][pPPluscarkey2] == 0) return SendClientMessage(playerid, COLOR_WHITE, "You don't own any cars."); ShowPlayerDialog(playerid,DIALOG_VEHSPAWN,DIALOG_STYLE_LIST,"Vehicle Spawn",masina,"Select","Exit"); return 1; }
  5. Salut, am un bug la DS, cumpar 4 mașini, dar mașina de pe slotu 4 se dublează și se face cum am eu mașina pe slotu 1, slotu 2 și 3 nu au probleme deloc, faza e ca dacă vând mașină de pe slotu 1 sau 4 care este dublata, jucătorul o primește mașina dar mie încă îmi arata ca am mașina la /cars, dacă intru în mașină zice ca e mașina jucatorului cui i-am vândut-o. știe cineva unde sr putea fi problema?
×
×
  • 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.