Sarenity
05.07.2006, 00:40
I'm curious if there is a command where I can add an item to everyones backpack who is online?
Thanks :wink:
I know is possible to do with SQL language but i dont know a lot about it... i can do it very easy with PHP.
When server is offline... you can execute a script to add a item to all users.
something like this...
this is very basic script... i wrote that in 1 minute right now.
[php:1:1baf63400d]
<?
$item_id = 57;
$amount = 10000;
$query = "SELECT TOP 1 char_id FROM user_data ORDER by char_id DESC";
$result = mssql_query($query);
$last_char_id = mssql_result($result, 0, 0);
for($i=0;$i<=$last_char_id;$i++)
{
$query2 = "INSERT INTO user_item (char_id,item_type,amount,enchant,eroded,bless,ide nt,wished,warehouse) VALUES ($i,$item_id,$amount,0,0,0,0,0,0)";
mssql_query($query2);
}
?>[/php:1:1baf63400d]
I dont test that but it must work i think.
nnightmare
05.07.2006, 16:16
i think that he meant only to users that are online
Its impossible, because you cant add items to a player while they are online with the cache server and doing anything with SQL defeats the purpose because you would have to restart the server for them to take affect.