24.05.2012, 18:19
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
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;
}