Problem for the spawn
#8

pawn Код:
new requete[256], rowl[128];
format(requete, sizeof(requete), "SELECT id FROM srp_players_houses WHERE owner='%s'", pName[playerid]);
MySQLCheckConnection();
mysql_query(requete);
mysql_store_result();

if(mysql_fetch_row(rowl))
{
    //spawn in the house using - strval(rowl)
}
else
{
    switch(random(2))
    {
        case 0: SetPlayerPos(playerid, 1742.7836, -1860.1030, 13.5791), SetInterior(playerid, 0);
        case 1: SetPlayerPos(playerid, 837.7275, -1341.4581, 7.1719), SetInterior(playerid, 0);
    }
}

printf("houseid - %d - name_player %s",strval(rowl), pName[playerid]); //this is just a debug to see what mysql gets
//if he is getting the same value has in database, i don't know where is the error
//but if doesn't get the same value, the problem is here obviously

mysql_free_result();
Reply


Messages In This Thread
Problem for the player's spawn (MySQL) - by TheSy - 07.06.2014, 23:08
Re: Problem for the spawn - by Dr.Einstein - 08.06.2014, 01:18
Re: Problem for the spawn - by TheSy - 08.06.2014, 01:24
Re: Problem for the spawn - by Zex Tan - 08.06.2014, 02:19
Re: Problem for the spawn - by TheSy - 08.06.2014, 02:24
Re: Problem for the spawn - by Zex Tan - 08.06.2014, 02:35
Re: Problem for the spawn - by TheSy - 08.06.2014, 11:47
Re: Problem for the spawn - by DartakousLien - 08.06.2014, 20:19

Forum Jump:


Users browsing this thread: 1 Guest(s)