10.02.2019, 16:51
Hey,
I made this Garage system for my gamemode. Its based on SQL and loads data from a DB in scriptfiles.
Whenever I try to use /creategarage, it doesn't show anything not even a message like 'Garage created'.
Heres the /creategarage code:-
(The return 0 is for someone who is not an admin and shows 'Unknown command' to them)
I didn't know what to search for this problem.
Any Help is appreciated.
I made this Garage system for my gamemode. Its based on SQL and loads data from a DB in scriptfiles.
Whenever I try to use /creategarage, it doesn't show anything not even a message like 'Garage created'.
Heres the /creategarage code:-
Код:
COMMAND:creategarage(cmdid, playerid, params[]) { if(playerData[playerid][playerLoggedIn]) { if(playerData[playerid][playerLevel] >= 5) { new newPrice ; if(sscanf(params, "i", newPrice)) { SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}Usage: \"creategarage <garage price>\""); } else { new query[400], Float:x, Float:y, Float:z, Float:intX, Float:intY, Float:intZ, Float:intA, Float:vintX, Float:vintY, Float:vintZ, Float:vintA, intID ; GetPlayerPos(playerid, x, y, z); intX = 1341.3508; intY = -1547.2848; intZ = 10036.9199; intA = 354.7931; vintX = 1341.3508; vintY = -1547.2848; vintZ = 10036.9199; vintA = 0.7696; intID = 9; format(query, sizeof(query), "INSERT INTO `garage_data` (garage_bought, garage_price, garage_owner, garageX, garageY, garageZ, interiorID, pinteriorX, pinteriorY, pinteriorZ, pinteriorAngle, vinteriorX, vinteriorY, vinteriorZ, vinteriorAngle) VALUES ('0', '%i', 'FGCNR', '%f', '%f', '%f', '%i', '%f', '%f', '%f', '%f')", newPrice, x, y, z, intID, intX, intY, intZ, intA, vintX, vintY, vintZ, vintA); db_query(DB:GARAGEDB, query); reloadGarages(); } } else { return 0; } } return 1; }
I didn't know what to search for this problem.
Any Help is appreciated.