Hello There, Guest! Login or Register


public doesn't work
#1
Hi All,

A short time ago I started to make a public function, but I still don't really get it.
I now have this:
Code:
public set_mysql_loggedin_level(pname, level)
{
       new giveplayerid[MAX_PLAYER_NAME];
    new prname[16];
    GetPlayerName(giveplayerid,prname,sizeof(prname));
    format(strlogin, sizeof(strlogin), "UPDATE users SET loggedin='%d' WHERE name = '%s'", level,prname);
    samp_mysql_query(strlogin);
    samp_mysql_store_result();
}

And what I think is, that I did it totally wrong!

What he needs to do is, if I do in a command in OnPlayerCommandText: set_mysql_loggedin_level(sendername, 0);
It needs to set/update the player level to 0. and if I insert 1 in the place of 0. It needs to be updated to 1. Don't look at the mysql-lines (format + 2 samp_mysql_), they are good.

I hope someone can help me! :)
Reply


Messages In This Thread
public doesn't work - by Xanland - 04-22-2008, 06:15 PM
Re: public doesn't work - by FarePak - 04-22-2008, 09:30 PM
Re: public doesn't work - by InVion - 04-22-2008, 09:33 PM
Re: public doesn't work - by Fry - 04-22-2008, 09:49 PM
Re: public doesn't work - by HaZe - 04-22-2008, 10:00 PM
Re: public doesn't work - by Xanland - 04-23-2008, 05:39 PM
Re: public doesn't work - by Motorola - 04-24-2008, 12:00 AM
Re: public doesn't work - by Fry - 04-24-2008, 12:24 AM
Re: public doesn't work - by Motorola - 04-24-2008, 12:28 AM
Re: public doesn't work - by Fry - 04-24-2008, 12:29 AM
Re: public doesn't work - by Motorola - 04-24-2008, 01:07 AM
Re: public doesn't work - by Jay - 04-24-2008, 12:06 PM
Re: public doesn't work - by Badeend - 04-24-2008, 12:40 PM
Re: public doesn't work - by Smoke - 04-24-2008, 12:43 PM
Re: public doesn't work - by Jay - 04-24-2008, 01:08 PM
Re: public doesn't work - by Xanland - 04-24-2008, 04:42 PM
Re: public doesn't work - by Smoke - 04-25-2008, 05:07 AM