12.02.2007, 16:37
Yep... also you only ever use IsPlayerConnected tbh, becuase you cant exactly do much to a disconnected player.
EDIT: To make this post useful....
Stop players entering the class selection screen by hitting F4:
EDIT2: GetPlayerSkin(playerid)
Replace all your AddPlayerClass with AddPlayerClass2. You can then use GetPlayerSkin(playerid).
EDIT: To make this post useful....
Stop players entering the class selection screen by hitting F4:
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
SpawnPlayer(playerid);
SetPlayerHealth(playerid, 100);
//rest of your code
return 1;
}
Replace all your AddPlayerClass with AddPlayerClass2. You can then use GetPlayerSkin(playerid).
pawn Code:
#define MAX_SKINS 300
new classes;
new ClassSkin[MAX_SKINS];
new PlayerSkin[MAX_PLAYERS];
stock AddPlayerClass2(skinid, Float:x, Float:y, Float:z, Float:r, w1,a1,w2,a2,w3,a3)
{
ClassSkin[classes]=skinid;
classes++;
return AddPlayerClass(skinid, Float:x, Float:y, Float:z, Float:r, w1,a1,w2,a2,w3,a3);
}
#define GetPlayerSkin(%1) PlayerSkin[%1]
public OnPlayerRequestClass(playerid, classid)
{
PlayerSkin[playerid]=ClassSkin[classid];
}