Hah it works for me now
Hah it works for me now
mysql_connect("localhost","user","password");
mysql_select_db("database");
Mine is not working.
Does nothing in-game when I say "!hunt 1,Asd"
I can see it on webpage.
i get this error.
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user'@'localhost' (using password: YES) in C:\xampp\htdocs\bounty-hunters.php on line 2
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\bounty-hunters.php on line 3
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\xampp\htdocs\bounty-hunters.php on line 3
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\bounty-hunters.php on line 41
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\bounty-hunters.php on line 41
i know i have to add:
but it is there already at the beginning...Code:mysql_connect("localhost","user","password"); mysql_select_db("database");
or should i add that at the lines where i get errors, like line 2,3 and 41?
i got errors whe ni say !hunt x, doesntexistname but is error on the function i think so ._o
.... wrong password man... your password is not password but if it is... wrong user, your user is not user, or maybe it is, but maybe it doesnt have root access, or your database name is wrong or your database name is database?
Do NOT work, i copy and pasted (im pr0 at that)
and edited only that PHP file (database)
I can see it on my web, and i can hunt INGAME, but when i killz, i dont get cash and it still says NOT KILLED at web. (it takes da money!!!!)
any helpz?
function onKill(cid, target)
if isPlayer(target) == TRUE then
---- BOUNTY HUNTERS START -----
pid = cid
pid2 = getPlayerGUID(target)
local result_plr = db.getResult("SELECT * FROM `bounty_hunters` WHERE `sp_id` = "..pid2.." AND `killed` = 0;")
if(result_plr:getID() ~= -1) then
prize = tonumber(result_plr:getDataInt("prize"))
bid = tonumber(result_plr:getDataInt("id"))
result_plr:free()
else
prize = 0
bid = 0
end
if (bid ~= 0 and prize ~= 0 and not(getTileInfo(getCreaturePosition(cid)).pvp)) then
db.executeQuery("UPDATE `bounty_hunters` SET `killed` = 1, `k_id`="..getPlayerGUID(cid)..", `kill_time` = " .. os.time() .. " WHERE `id` = "..bid..";")
doPlayerAddMoney(cid,prize*1000)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'[BOUNTY HUNTERS] You killed hunted player, so you gained the reward!')
end
---- BOUNTY HUNTERS END -----
end
return TRUE
end
Warning: include(bounty-hunters.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\index.php on line 136
Warning: include() [function.include]: Failed opening 'bounty-hunters.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\index.php on line 136