Jump to content

InceMan

Membru
  • Posts

    754
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by InceMan

  1. nu stergi ce ai la public insertca si il adaugi pe care team dat eu
  2. // type 1 - car | 2 - moto/bike | 3 - heli | 4 - premium cars. public InsertCar(playerid,type,stockid) { new string[128],sendername[25],namecar[100]; new idd = Findcar(); new model = Stock[stockid][vModel]; new value = Stock[stockid][vPrice]; strmid(namecar,Stock[stockid][vName], 0, 100, 255); GetPlayerName(playerid,sendername,sizeof(sendername)); BuyCar[playerid] = -1; if(idd != 0) { if(GetPlayerCash(playerid) < value) return SCM(playerid,COLOR_WHITE,"{FFB870}You do not have enough money."); if(type == 1) { if(PlayerInfo[playerid][pPremiumAccount] == 0 && PlayerInfo[playerid][pPlusSlot1] == 0 && PlayerInfo[playerid][pPlusSlot2] == 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 cars."); } } if(PlayerInfo[playerid][pPlusSlot1] == 1 && PlayerInfo[playerid][pPremiumAccount] == 0 && PlayerInfo[playerid][pPlusSlot2] == 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey] == 0) { PlayerInfo[playerid][pPPluscarkey] = idd; Update(playerid,pPPluscarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 cars + 1 plus car."); } } if(PlayerInfo[playerid][pPlusSlot1] == 1 && PlayerInfo[playerid][pPlusSlot2] == 1 && PlayerInfo[playerid][pPremiumAccount] == 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey] == 0) { PlayerInfo[playerid][pPPluscarkey] = idd; Update(playerid,pPPluscarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey2] == 0) { PlayerInfo[playerid][pPPluscarkey2] = idd; Update(playerid,pPPluscarkey2x); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 cars + 2 plus cars."); } } if(PlayerInfo[playerid][pPlusSlot1] == 1 && PlayerInfo[playerid][pPlusSlot2] == 0 && PlayerInfo[playerid][pPremiumAccount] > 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey] == 0) { PlayerInfo[playerid][pprcarkey] = idd; Update(playerid,pprcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey2] == 0) { PlayerInfo[playerid][pprcarkey2] = idd; Update(playerid,pprcarkey2x); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey] == 0) { PlayerInfo[playerid][pPPluscarkey] = idd; Update(playerid,pPPluscarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 cars + 2 premium cars + 1 plus car."); } } if(PlayerInfo[playerid][pPlusSlot1] == 1 && PlayerInfo[playerid][pPlusSlot2] == 1 && PlayerInfo[playerid][pPremiumAccount] > 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey] == 0) { PlayerInfo[playerid][pprcarkey] = idd; Update(playerid,pprcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey2] == 0) { PlayerInfo[playerid][pprcarkey2] = idd; Update(playerid,pprcarkey2x); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey] == 0) { PlayerInfo[playerid][pPPluscarkey] = idd; Update(playerid,pPPluscarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey2] == 0) { PlayerInfo[playerid][pPPluscarkey2] = idd; Update(playerid,pPPluscarkey2x); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 cars + 2 premium cars + 2 plus cars."); } } if(PlayerInfo[playerid][pPremiumAccount] > 0 && PlayerInfo[playerid][pPlusSlot1] == 0 && PlayerInfo[playerid][pPlusSlot2] == 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey] == 0) { PlayerInfo[playerid][pprcarkey] = idd; Update(playerid,pprcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey2] == 0) { PlayerInfo[playerid][pprcarkey2] = idd; Update(playerid,pprcarkey2x); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 premium cars + 2 cars."); } } } Stock[stockid][vStock]--; mysql_format(SQL, string, sizeof(string), "UPDATE stock SET Stock='%d' WHERE ID='%d'", Stock[stockid][vStock],stockid); mysql_tquery(SQL,string,"",""); GivePlayerCash(playerid,-value); Update(playerid,pCashx); CarInfo[idd][cSell] = 1; CarInfo[idd][cID] = idd; CarInfo[idd][cModel] = model; CarInfo[idd][cColorOne] = 1; CarInfo[idd][cColorTwo] = 1; strmid(CarInfo[idd][cOwner], PlayerInfo[playerid][pNormalName], 0, 25, 255); strmid(CarInfo[idd][cDescription],namecar, 0, strlen(namecar), 255); CarInfo[idd][cValue] = value; strmid(CarInfo[idd][cLicense], "NewCar", 0, 6, 255); CarInfo[idd][cOwned] = 1; CarInfo[idd][cLock] = 0; CarInfo[idd][cTimed] = 0; CarInfo[idd][cInscarprice] = 100; CarInfo[idd][cInsurancecar] = 4; CarInfo[idd][cKM] = 0.0; CarInfo[idd][cHP] = 1000.0; CarInfo[idd][cDamage1] = 0; CarInfo[idd][cDamage2] = 0; CarInfo[idd][cDamage3] = 0; CarInfo[idd][cDamage4] = 0; CarInfo[idd][cGas] = 100; CarInfo[idd][cPaintJ] = 6; CarInfo[idd][mod1] = 0; CarInfo[idd][mod2] = 0; CarInfo[idd][mod3] = 0; CarInfo[idd][mod4] = 0; CarInfo[idd][mod5] = 0; CarInfo[idd][mod6] = 0; CarInfo[idd][mod7] = 0; CarInfo[idd][mod8] = 0; CarInfo[idd][mod9] = 0; CarInfo[idd][mod10] = 0; CarInfo[idd][mod11] = 0; CarInfo[idd][mod12] = 0; CarInfo[idd][mod13] = 0; CarInfo[idd][mod14] = 0; CarInfo[idd][mod15] = 0; CarInfo[idd][mod16] = 0; CarInfo[idd][mod17] = 0; CarInfo[idd][cDays] = 0; new randomds = random(12)+1; CarInfo[idd][cLocationx] = RandomDealership[randomds][0]; CarInfo[idd][cLocationy] = RandomDealership[randomds][1]; CarInfo[idd][cLocationz] = RandomDealership[randomds][2]; CarInfo[idd][cAngle] = RandomDealership[randomds][3]; vUpdate(idd, cModsx); vUpdate(idd, cPaintJx); vUpdate(idd, cSellx); vUpdate(idd, cLocationxx); vUpdate(idd, cLocationyx); vUpdate(idd, cLocationzx); vUpdate(idd, cAnglex); vUpdate(idd, cModelx); vUpdate(idd, cColorOnex); vUpdate(idd, cColorTwox); vUpdate(idd, cOwnerx); vUpdate(idd, cValuex); vUpdate(idd, cLicensex); vUpdate(idd, cDescriptionx); vUpdate(idd, cLockx); vUpdate(idd, cTimedx); vUpdate(idd, cInscarpricex); vUpdate(idd, cInsurancecarx); vUpdate(idd, cKMx); vUpdate(idd, cOwnedx); vUpdate(idd, cDaysx); vUpdate(idd, cHPx); vUpdate(idd, cDamage1x); vUpdate(idd, cDamage2x); vUpdate(idd, cDamage3x); vUpdate(idd, cDamage4x); vUpdate(idd, cGasx); new car = CreateVehicle(CarInfo[idd][cModel],CarInfo[idd][cLocationx],CarInfo[idd][cLocationy],CarInfo[idd][cLocationz],CarInfo[idd][cAngle],1,1,500000); SetVehicleNumberPlate(car,CarInfo[idd][cLicense]); new disp[184],stringsss[256],numele[30]; format(disp,sizeof(disp),"You bought %s.Please take your car and park it elsewhere.",CarInfo[idd][cDescription]); SCM(playerid,COLOR_LIGHTBLUE,disp); GetPlayerName(playerid, numele, sizeof(numele)); format(stringsss,sizeof(stringsss),"%s [user:%d] bought a %s [car:%d] for $%s.",numele,PlayerInfo[playerid][pSQLID],CarInfo[idd][cDescription],CarInfo[idd][cID],FormatNumber(value)); ABroadCast(COLOR_YELLOW,stringsss,1); new var100[256],y,m,d,h,mi,s,string2[256],string3[256]; getdate(y,m,d); gettime(h,mi,s); format(string2,sizeof(string2),"[%02d-%02d-%d %02d:%02d:%02d] %s",d,m,y,h,mi,s,stringsss); mysql_real_escape_string(string2, string3); mysql_format(SQL, var100, sizeof(var100), "INSERT INTO playerlogs (`playerid`,`giverid`,`action`,`time`) VALUES ('%d','0','%s','%02d-%02d-%d %02d:%02d:%02d')", PlayerInfo[playerid][pSQLID],string3,d,m,y,h,mi,s); mysql_tquery(SQL,var100,"",""); OwnedVeh(car) = idd; if(idd == PlayerInfo[playerid][pPcarkey]) { personalcar[0][playerid] = car; } if(idd == PlayerInfo[playerid][pmotokey]) { personalcar[1][playerid] = car; } if(idd == PlayerInfo[playerid][pprcarkey]) { personalcar[2][playerid] = car; } if(idd == PlayerInfo[playerid][pprcarkey2]) { personalcar[3][playerid] = car; } if(idd == PlayerInfo[playerid][pPPluscarkey]) { personalcar[4][playerid] = car; } if(idd == PlayerInfo[playerid][pPPluscarkey2]) { personalcar[5][playerid] = car; } masini++; SwitchKey[playerid] = 1; } if(idd == 0) { if(GetPlayerCash(playerid) < value) return SCM(playerid,COLOR_WHITE,"{FFB870}You do not have enough money."); new Cache: sar = mysql_query(SQL,"SELECT * FROM `cars`"); idd = cache_num_rows()+1; cache_delete(sar); if(type == 1) { if(PlayerInfo[playerid][pPremiumAccount] == 0 && PlayerInfo[playerid][pPlusSlot1] == 0 && PlayerInfo[playerid][pPlusSlot2] == 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 cars."); } } if(PlayerInfo[playerid][pPlusSlot1] == 1 && PlayerInfo[playerid][pPremiumAccount] == 0 && PlayerInfo[playerid][pPlusSlot2] == 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey] == 0) { PlayerInfo[playerid][pPPluscarkey] = idd; Update(playerid,pPPluscarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 cars + 1 plus car."); } } if(PlayerInfo[playerid][pPlusSlot1] == 1 && PlayerInfo[playerid][pPlusSlot2] == 1 && PlayerInfo[playerid][pPremiumAccount] == 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey] == 0) { PlayerInfo[playerid][pPPluscarkey] = idd; Update(playerid,pPPluscarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey2] == 0) { PlayerInfo[playerid][pPPluscarkey2] = idd; Update(playerid,pPPluscarkey2x); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 cars + 2 plus cars."); } } if(PlayerInfo[playerid][pPlusSlot1] == 1 && PlayerInfo[playerid][pPlusSlot2] == 0 && PlayerInfo[playerid][pPremiumAccount] > 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey] == 0) { PlayerInfo[playerid][pprcarkey] = idd; Update(playerid,pprcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey2] == 0) { PlayerInfo[playerid][pprcarkey2] = idd; Update(playerid,pprcarkey2x); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey] == 0) { PlayerInfo[playerid][pPPluscarkey] = idd; Update(playerid,pPPluscarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 cars + 2 premium cars + 1 plus car."); } } if(PlayerInfo[playerid][pPlusSlot1] == 1 && PlayerInfo[playerid][pPlusSlot2] == 1 && PlayerInfo[playerid][pPremiumAccount] > 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey] == 0) { PlayerInfo[playerid][pprcarkey] = idd; Update(playerid,pprcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey2] == 0) { PlayerInfo[playerid][pprcarkey2] = idd; Update(playerid,pprcarkey2x); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey] == 0) { PlayerInfo[playerid][pPPluscarkey] = idd; Update(playerid,pPPluscarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pPPluscarkey2] == 0) { PlayerInfo[playerid][pPPluscarkey2] = idd; Update(playerid,pPPluscarkey2x); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 cars + 2 premium cars + 2 plus cars."); } } if(PlayerInfo[playerid][pPremiumAccount] > 0 && PlayerInfo[playerid][pPlusSlot1] == 0 && PlayerInfo[playerid][pPlusSlot2] == 0) { if(PlayerInfo[playerid][pPcarkey] == 0) { PlayerInfo[playerid][pPcarkey] = idd; Update(playerid,pPcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else { if(PlayerInfo[playerid][pmotokey] == 0) { PlayerInfo[playerid][pmotokey] = idd; Update(playerid,pmotokeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey] == 0) { PlayerInfo[playerid][pprcarkey] = idd; Update(playerid,pprcarkeyx); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else if(PlayerInfo[playerid][pprcarkey2] == 0) { PlayerInfo[playerid][pprcarkey2] = idd; Update(playerid,pprcarkey2x); CarInfo[idd][cLocationx] = 284.5032; CarInfo[idd][cLocationy] = -1526.4036; CarInfo[idd][cLocationz] = 24.3208; CarInfo[idd][cAngle] = 235.1191; } else return SCM(playerid,COLOR_WHITE,"{FFB870}Already own 2 premium cars + 2 cars."); } } } Stock[stockid][vStock]--; mysql_format(SQL, string, sizeof(string), "UPDATE stock SET Stock='%d' WHERE ID='%d'", Stock[stockid][vStock],stockid); mysql_tquery(SQL,string,"",""); GivePlayerCash(playerid,-value); Update(playerid,pCashx); CarInfo[idd][cID] = idd; CarInfo[idd][cModel] = model; CarInfo[idd][cColorOne] = 1; CarInfo[idd][cColorTwo] = 1; strmid(CarInfo[idd][cOwner], PlayerInfo[playerid][pNormalName], 0, 25, 255); strmid(CarInfo[idd][cDescription],namecar, 0, strlen(namecar), 255); CarInfo[idd][cValue] = value; strmid(CarInfo[idd][cLicense], "NewCar", 0, 6, 255); CarInfo[idd][cOwned] = 1; CarInfo[idd][cLock] = 0; CarInfo[idd][cTimed] = 0; CarInfo[idd][cInscarprice] = 100; CarInfo[idd][cInsurancecar] = 4; CarInfo[idd][cKM] = 0.0; CarInfo[idd][cHP] = 1000.0; CarInfo[idd][cDamage1] = 0; CarInfo[idd][cDamage2] = 0; CarInfo[idd][cDamage3] = 0; CarInfo[idd][cDamage4] = 0; CarInfo[idd][cGas] = 100; CarInfo[idd][cSell] = 1; CarInfo[idd][cPaintJ] = 6; CarInfo[idd][mod1] = 0; CarInfo[idd][mod2] = 0; CarInfo[idd][mod3] = 0; CarInfo[idd][mod4] = 0; CarInfo[idd][mod5] = 0; CarInfo[idd][mod6] = 0; CarInfo[idd][mod7] = 0; CarInfo[idd][mod8] = 0; CarInfo[idd][mod9] = 0; CarInfo[idd][mod10] = 0; CarInfo[idd][mod11] = 0; CarInfo[idd][mod12] = 0; CarInfo[idd][mod13] = 0; CarInfo[idd][mod14] = 0; CarInfo[idd][mod15] = 0; CarInfo[idd][mod16] = 0; CarInfo[idd][mod17] = 0; CarInfo[idd][cDays] = 0; new randomds = random(12)+1; CarInfo[idd][cLocationx] = RandomDealership[randomds][0]; CarInfo[idd][cLocationy] = RandomDealership[randomds][1]; CarInfo[idd][cLocationz] = RandomDealership[randomds][2]; CarInfo[idd][cAngle] = RandomDealership[randomds][3]; mysql_format(SQL, string, sizeof(string),"INSERT INTO cars (ID, Model) VALUES (%d, %d)", idd, CarInfo[idd][cModel]); mysql_tquery(SQL,string,"",""); vUpdate(idd, cModsx); vUpdate(idd, cPaintJx); vUpdate(idd, cSellx); vUpdate(idd, cLocationxx); vUpdate(idd, cLocationyx); vUpdate(idd, cLocationzx); vUpdate(idd, cAnglex); vUpdate(idd, cColorOnex); vUpdate(idd, cColorTwox); vUpdate(idd, cOwnerx); vUpdate(idd, cValuex); vUpdate(idd, cLicensex); vUpdate(idd, cDescriptionx); vUpdate(idd, cLockx); vUpdate(idd, cTimedx); vUpdate(idd, cInscarpricex); vUpdate(idd, cInsurancecarx); vUpdate(idd, cKMx); vUpdate(idd, cOwnedx); vUpdate(idd, cDaysx); vUpdate(idd, cHPx); vUpdate(idd, cDamage1x); vUpdate(idd, cDamage2x); vUpdate(idd, cDamage3x); vUpdate(idd, cDamage4x); vUpdate(idd, cGasx); new car = CreateVehicle(CarInfo[idd][cModel],CarInfo[idd][cLocationx],CarInfo[idd][cLocationy],CarInfo[idd][cLocationz],CarInfo[idd][cAngle],1,1,500000); SetVehicleNumberPlate(car,CarInfo[idd][cLicense]); new disp[184],stringsss[256],numele[30]; format(disp,sizeof(disp),"You bought %s.Please take your car and park it elsewhere.",CarInfo[idd][cDescription]); SCM(playerid,COLOR_LIGHTBLUE,disp); GetPlayerName(playerid, numele, sizeof(numele)); format(stringsss,sizeof(stringsss),"%s [user:%d] bought a %s [car:%d] for $%s.",numele,PlayerInfo[playerid][pSQLID],CarInfo[idd][cDescription],CarInfo[idd][cID],FormatNumber(value)); ABroadCast(COLOR_YELLOW,stringsss,1); new var100[256],y,m,d,h,mi,s,string2[256],string3[256]; getdate(y,m,d); gettime(h,mi,s); format(string2,sizeof(string2),"[%02d-%02d-%d %02d:%02d:%02d] %s",d,m,y,h,mi,s,stringsss); mysql_real_escape_string(string2, string3); mysql_format(SQL, var100, sizeof(var100), "INSERT INTO playerlogs (`playerid`,`giverid`,`action`,`time`) VALUES ('%d','0','%s','%02d-%02d-%d %02d:%02d:%02d')", PlayerInfo[playerid][pSQLID],string3,d,m,y,h,mi,s); mysql_tquery(SQL,var100,"",""); OwnedVeh(car) = idd; if(idd == PlayerInfo[playerid][pPcarkey]) { personalcar[0][playerid] = car; } if(idd == PlayerInfo[playerid][pmotokey]) { personalcar[1][playerid] = car; } if(idd == PlayerInfo[playerid][pprcarkey]) { personalcar[2][playerid] = car; } if(idd == PlayerInfo[playerid][pprcarkey2]) { personalcar[3][playerid] = car; } if(idd == PlayerInfo[playerid][pPPluscarkey]) { personalcar[4][playerid] = car; } if(idd == PlayerInfo[playerid][pPPluscarkey2]) { personalcar[5][playerid] = car; } masini++; SwitchKey[playerid] = 1; } return 1; }
  3. da aratal
  4. arata cod sursa daca vrei sa te ajut
  5. ce fel de probleme?
  6. https://www.sa-mp.ro/forums/topic/26283-problemaserver/#comment-150200 tu nu sti sa pornesti un gamemod si faci si scripting
  7. foreach(Player,i) { ShowPlayerNameTagForPlayer(i, playerid, 0); } foreach(Player,i) { ShowPlayerNameTagForPlayer(i, playerid, 1); }
  8. voi reveni cu un link de download in curand cu mai multe comenzi.
  9. daca un plugin spune denumidea Failed, asta inseamna ca necesita uploade la acel plugin suau denumirea .so , .dll din ce vad nu iti ruleaza niciun plugins
  10. - Acest Anti-hack a fost creat de mine si contine: 1. Anti-High Ping (300) ; 2. Anti-Jetpack ; 3. Anti-Money Hack ; 4. Anti-Weapon Hack ; Weapon Blocker ; 5. Anti-Health Hack ; 6. Anti-Armour Hack ; 7. Anti-Vehicle Speed Hack ; 8. Anti-Command Spam ; 9. Anti-Fly Car ; 10. Anti C-BUG System ; Pentru download [IN ROMANA DESIGUR] :http://www.solidfiles.com/d/f8ce0c3f8a/Anti.pwn -> PWN, doar compilati !Cod: /* ANTI-SYSTEM 1. Anti-High Ping (300) ; 2. Anti-Jetpack ; 3. Anti-Money Hack ; 4. Anti-Weapon Hack ; Weapon Blocker ; 5. Anti-Health Hack ; 6. Anti-Armour Hack ; 7. Anti-Vehicle Speed Hack ; 8. Anti-Command Spam ; 9. Anti-Fly Car ; 10. Anti C-BUG System ; */ //------------------------------------------------------------------------------ #include <a_samp> //------------------------------------------------------------------------------ forward PingChecker(); forward AntiJetpack(); forward GivePlayerMoneyEx(playerid,ammount); forward CheckMoney(); //------------------------------------------------------------------------------ new bool:PingChecked[MAX_PLAYERS]; new OldMoney[MAX_PLAYERS]; new NewMoney[MAX_PLAYERS]; new Float:pHealth, Float:pArmour; //------------------------------------------------------------------------------ public OnGameModeInit() { SetTimer("PingChecker", 60000, true); SetTimer("CheckMoney",5000,true); return 1; } public PingChecker() { for(new i;i < MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { if(GetPlayerPing(i) > 300 && PingChecked[i] == false) { SendClientMessage(i, -1, "[SERVER]: {15FF00}Ai fost prins cu Ping mare. Rezolva-l, sau vei primi kick !"); PingChecked[i] = true; } if(GetPlayerPing(i) > 300 && PingChecked[i] == true) { new pName[MAX_PLAYER_NAME] , string[MAX_PLAYER_NAME*2]; GetPlayerName(i, pName, sizeof(pName)); format(string, sizeof(string), "{FF0000}[SERVER]: {FFCC33}%s {15FF00}a primit kick de la {FF0000}AdmBot ! {FFFFFF}|| {FFFF00}Motiv: {15FF00}Ping-Mare", pName); SendClientMessageToAll(-1, string); SendClientMessage(i, -1, "{FF0000}[SERVER]: {FFCC33}Ai primit kick de la AdmBot || {FFFF00}Motiv: {15FF00}Ping Mare !"); Kick(i); } } } return 1; } public AntiJetpack() { new playerid; if (GetPlayerSpecialAction(playerid) == 2) { new string[128],name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"{FF0000}[SERVER]: {FFCC33}%s {15FF00}a primit kick de la {FF0000}AdmBot ! {FFFFFF}|| {FFFF00}Motiv: {15FF00}Jetpack",name); SendClientMessageToAll(-1,string); Kick(playerid); } } public GivePlayerMoneyEx(playerid,ammount) { OldMoney[playerid] = GetPlayerMoney(playerid); NewMoney[playerid] = ammount; GivePlayerMoney(playerid,ammount); return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_FIRE && ForbiddenWeap(playerid) && !IsPlayerAdmin(playerid)) { new pname[MAX_PLAYER_NAME]; new string[124]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "[SERVER]: {FFCC33}%s {15FF00}a primit kick de la {FF0000}AdminBot ! {FFFFFF}|| {FFFF00}Motiv: {15FF00}Hack de arme !", pname); SendClientMessageToAll(-1,string); print(string); SetTimerEx("KickTimer", 10, false, "i", playerid); BanEx(playerid,string); return 1; } if(pHealth >= 100.1) { Kick(playerid); } if(pArmour >= 100.1) { Kick(playerid); } return 0; } public CheckMoney() { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(GetPlayerMoney(i) > NewMoney[i]) { ResetPlayerMoney(i); GivePlayerMoney(i,OldMoney[i]); } } } return 1; } public OnPlayerText(playerid, text[]) { new lol = GetTickCount(); if(GetTickCount() - lol < 3000) { SendClientMessage(playerid,-1,"{FF0000}[SERVER]: {15FF00}Ai nevoie de 3 secunde, inainte sa folosesti alta comanda !"); } return 1; } stock ForbiddenWeap(playerid) { new wp = GetPlayerWeapon(playerid); if( wp == 38 || wp == 37 || wp == 36 || wp == 35) { return true; } return false; } stock GetVehicleVelocityVehicle(vehicle) { new Float:Velocity[3], output[80]; GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]); if(Velocity >= 500) { Kick(playerid); } } forward OnPlayerCBug(playerid); public OnPlayerCBug(playerid) { new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); new str2[128]; new string[128]; format(str2, sizeof(str2), "{FF0000}[SERVER]: {15FF00}%s a primit kick de la {FF0000}AdmBot ! || {FFFF00}Motiv: {15FF00}C-BUG", playername); new Float:Health; GetPlayerHealth(playerid,Health); SetPlayerHealth(playerid,Health-10); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z+15); PlayerPlaySound(playerid,1190,0.0,0.0,0.0); PlayerPlaySound(playerid,1190,0.0,0.0,0.0); SendClientMessageToAll(-1, string); Kick(playerid); return 1;
  11. Introducere: Acesta este primul meu script care consta in sistemul de Donator. E ca si un sistem VIP. Aproape. Comenzi: /dcmds in joc ca sa le vedeti. /makedonator [ID] - face un player donator. /getdonator[ID] - Ia rankul de donator de la un player. Alte informati: Donatori se salveaza. De altfel puteti modifica orice comanda dupa bunul plac. Download: http://www.2shared.c...R/sDonator.html 0
  12. InceMan

    [Map] Terasa

    frumos copaci aia cam incurca
  13. Nu te mai bagă în seamă
  14. poti sa-ne arati mai multe poze?
  15. iti recomand zeroping nu te uita ca dai mai multi bani dar se merita decat sa te alegi cu o teapa
  16. am verificat si aia in pawno am #define MAX_PERSONAL_CARS (101) si in sql la stock am tot 101
  17. nu ma deranjeaza
  18. nu imi arata nimic pur si simplu imi dispare dialogul
  19. pai dau /buycar cheap cars si nu se intampla nimica
  20. Am pus cu-m ai spus tu si nu imi da nimic in log mie nu imi apare stock la comanda /buycar
  21. Salut, astazi va voi arata cum sa scriptati cu Atom. Sincer mie imi place doar pentru ca are tema aceea mai intunecata, si cam atata, orcum programul are parti bune (autocompletare) sau mai de cacat (da cresh uneori) Acestea find spuse, sa incepem la tutorial! 1. descarcam Atom !Click aici2. il instalam nu ar trebui sa fie un proces foarte complicat, nu?Arata chear frumos Dar acum sa trecem la configurare Odata intrati in program, dati click pe install a PackageSi apasam butonulOdata Intrati in acest meniu, cautati pawnoAici descarcatiIanguare-pawn si pawn-build. Dupa ce ati instalat pachetul pawn-build, ar trebui sa va aparaApasam settings Cateva scroll-uri siIi spunem unde se afla pawncc. Cam atat. sper ca v-am fost de folos cu acest tutorial, si sper ca m-am exprimat cat de bine am putut!
  22. http://pastebin.com/bzqxGygA
  23. deci am incercat sa adaug la /buycar inca o categorie de masini personale si dupa ce am facut uploade doar masinile cont premium imi aparea in ds restul masinilor nu imi mai apar CMD:buycar(playerid, params[]) { if(LogatPin[playerid] == 0) return SCM(playerid, -1, "Contul tau este {ff0000}blocat{ffffff}, foloseste {ff0000}/pin{ffffff} pentru a-l debloca"); 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, 1300.3134,-1438.1810,13.5919)) { 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", "Select", "Close"); } else return SCM(playerid,COLOR_WHITE,"{FFB870}You are not the place where you can buy a car."); return 1; }
×
×
  • 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.