28.04.2013, 20:48
It creates the table (If it hasn't already been created) but when I try to register a name, it doesn't insert it into the table. Anyone know what's wrong?
pawn Код:
stock Register(playerid, pass[])
{
new Query[200], name[24], ip[16];
GetPlayerName(playerid,name,24);
GetPlayerIp(playerid,ip,16);
format(Query,200,"INSERT INTO `playerdata` (user, password, ip, money, score) VALUES ('%s', SHA('%s'), '%s', 0, 0)",name,pass,ip);
mysql_query(Query);
GameTextForPlayer(playerid,"~b~~h~registered",3000,3);
Logged[playerid] = 1;
return 1;
}