Spawn in Blueberry
#8

Quote:
Originally Posted by Cypress
Посмотреть сообщение
Nothing is wrong with your OnPlayerSpawn callback. Try this:

pawn Код:
stock SetPlayerData(playerid)
{
    Player[playerid][ID] = cache_get_field_content_int(0, "id");
    cache_get_field_content(0, "password", Player[playerid][Password], SQL, 129);
    //The password is a varchar so you need to use cache_get_field_content
    Player[playerid][Admin] = cache_get_field_content_int(0,"admin");
    Player[playerid][Health] = cache_get_field_content_float(0, "health");
    Player[playerid][Armour] = cache_get_field_content_float(0, "armour");
   
    cache_get_field_content(0, "admintitle", Player[playerid][AdminTitle], SQL, 64);
    //the admin title is a varchar so it is again retrieved by cache_get_field_content.
    Player[playerid][Level] = cache_get_field_content_int(0,"level");
    //the level is an integer.

    Player[playerid][PosX] = cache_get_field_content_float(0, "PosX"); //Since player's position is a float, we use cache_get_field_content_float
    Player[playerid][PosY] = cache_get_field_content_float(0, "PosY");
    Player[playerid][PosZ] = cache_get_field_content_float(0, "PosZ");
    return 1;
}
Worked Thanks! +rep
Reply


Messages In This Thread
Spawn in Blueberry - by JordanDoughty - 21.06.2014, 19:40
Re: Spawn in Blueberry - by GeekSiMo - 21.06.2014, 20:33
Re: Spawn in Blueberry - by JM_Millers - 21.06.2014, 20:44
Re: Spawn in Blueberry - by JordanDoughty - 21.06.2014, 21:04
Re: Spawn in Blueberry - by Juvanii - 21.06.2014, 21:20
Re: Spawn in Blueberry - by JordanDoughty - 21.06.2014, 21:33
Re: Spawn in Blueberry - by Cypress - 21.06.2014, 21:51
Re: Spawn in Blueberry - by JordanDoughty - 21.06.2014, 22:17

Forum Jump:


Users browsing this thread: 1 Guest(s)