Skin won't change on spawn
#3

SpawnPlayer is called, it's in the 3rd line of the 2nd code snippet. I'm calling OnPlayerSpawn to set the player position and weapons.

EDIT:

I replaced the variable with the number, still not working :S

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(gPlayerLogged[playerid] == 1)
    {
//==================================[FUEL TEXDRAW]==================================
        FuelText[playerid] = TextDrawCreate(509, 99,"Fuel: 100");
        TextDrawLetterSize(Text:FuelText[playerid], 0.370000, 1.500000);
        TextDrawColor(Text:FuelText[playerid], -1361844506);
        TextDrawSetOutline(Text:FuelText[playerid], 1);
        TextDrawSetProportional(Text:FuelText[playerid], 1);
//==================================[RESETTING PLAYER VARIABLES]==================================
        SetPlayerWeapons(playerid);
       
        SetPlayerSkin(playerid, 299);
        SendClientMessage(playerid, COLOR_WHITE, "Skin changed"); // This actually shows up, just haven't noticed.
        SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
        print("Skin SET");
        //gPlayerLogged[playerid] = 0;
        print("Variable set to FALSE");
        SetPlayerSpawn(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
Skin won't change on spawn - by Makaveli93 - 24.05.2012, 18:14
Re: Skin won't change on spawn - by SuperViper - 24.05.2012, 18:17
Re: Skin won't change on spawn - by Makaveli93 - 24.05.2012, 18:19
Re: Skin won't change on spawn - by Pizzy - 24.05.2012, 19:20

Forum Jump:


Users browsing this thread: 2 Guest(s)