PDA

View Full Version : [NEW] Help with Admin Skin script


c0GI
09/10/2011, 06:10 PM
Hy Im again! I have a problem with Admin Skin at SPAWN! I want to insert a script at an admin of Admin level 1,admlvl 2, admin lvl 3, and admlvl 4 and OWNER spawn to change skin at 294, and give admin at spawn armour 9999 and hp 9999! But JUST WORK Armour and HP! I want to create for me LIKE THIS :

public OnPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] > 1)
{
SetPlayerSkin(playerid, 294);
SetPlayerArmour(playerid, 9999);
SetPlayerHealth(playerid, 9999);
}
}

But when I add a return 1; to end of the script, when I join to the server or anywone when he loggin the SOUNT is playing all of the playing!! And if a NEW Player join the game the tutorial DIDNT START??? I dont know WHY! :'(

CAN SOMEBODY HELP ME :'(

DRIFT_HUNTER
09/10/2011, 06:22 PM
I think you MUST return 1 on player spawn...nvm


public OnPlayerRequestSpawn(playerid)
{
if(PlayerInfo[playerid][pAdmin] > 1)
{
SetSpawnInfo(playerid, NO_TEAM, 294, X, Y ,Z, R, 0,0,0,0,0,0);
}
return 1;
}

public OnPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] > 1)
{
SetPlayerArmour(playerid, 9999);
SetPlayerHealth(playerid, 9999);
}
}
return 1;
}

Replace X, Y, Z, R (rotation / facing angle) in SetSpawnInfo

c0GI
09/10/2011, 09:10 PM
thanks dude :)