Attól függ mibe akarod. MySQL? SQLite? Netán valamilyen fájlkezelõ? Az utóbbival nehéz lesz ilyesmit menteni, ha már több változód is lesz.
CMD:garazsvesz(playerid, params[]){ for(new i=0; i < garageCount+1; i++) { if(IsPlayerInRangeOfPoint(playerid, 3.0, gInfo[PosX], gInfo[PosY], gInfo[PosZ])) { if(gInfo[Owned] == 1) return SendClientMessage(playerid, COLOR_ERROR,\"Error: This garage is already owned.\"); if(GetPlayerMoney(playerid) > gInfo[Price]) return SendClientMessage(playerid,COLOR_ERROR,\"Error: You don\'t have enough money to buy this garage.\"); GivePlayerMoney(playerid,-gInfo[Price]); gInfo[Price]-= random(5000); //Take some money off of the original price format(gInfo[Owner],24,\"%s\",GetPlayerNameEx(playerid)); gInfo[Owned] = 1; Save_Garage(i); UpdateGarageInfo(i); SendClientMessage(playerid,COLOR_SUCCESS,\"You have successfully bought this garage.\"); return 1; } } SendClientMessage(playerid,COLOR_ERROR,\"Error: You\'re not near any garage.\"); return 1;}
CMD:garazsvesz(playerid, params[]) {for(new i=0; i < garageCount+1; i++) {if(!IsPlayerInRangeOfPoint(playerid, 3.0, gInfo[PosX], gInfo[PosY], gInfo[PosZ])) continue;if(gInfo[Owned] == 1) return SendClientMessage(playerid, COLOR_ERROR,\"Error: This garage is already owned.\");if(GetPlayerMoney(playerid) < gInfo[Price]) return SendClientMessage(playerid,COLOR_ERROR,\"Error: You don\'t have enough money to buy this garage.\");GivePlayerMoney(playerid,-gInfo[Price]);gInfo[Price]-= random(5000); //Take some money off of the original priceformat(gInfo[Owner],24,\"%s\",GetPlayerNameEx(playerid));gInfo[Owned] = 1;Save_Garage(i);UpdateGarageInfo(i);return SendClientMessage(playerid,COLOR_SUCCESS,\"You have successfully bought this garage.\");}return SendClientMessage(playerid,COLOR_ERROR,\"Error: You\'re not near any garage.\");}
mysql_format(ABKapcs, Kveri, 486, \"UPDATE jatekosok SET Kinezet = \'%d\', Penz = \'%d\', Elet = \'%f\', Melleny = \'%f\', Vilag = \'%d\', Belso = \'%d\', KrdX = \'%f\', KrdY = \'%f\', KrdZ = \'%f\', KrdF = \'%f\'\", \\GetPlayerSkin(playerid), GetPlayerMoney(playerid), GetPlayerHealth(playerid), GetPlayerArmour(playerid), GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), p[0], p[1], p[2], p[3]);