Onplayerrequestspawn bugged again -
KillerStrike23 - 01.05.2014
hey I have a problem in onplayerrequestspawn okey, when player try to choose admin skin or any skin that is listed and he is not an admin he will got an error message you are not an admin you can't use this skin but why when he press shift or spawn it don't send one message its sends 4 its a weird bug I gone to all server and on a 1 press it just sends 1 message and in mine for 1 press 4 messages :/
Re: Onplayerrequestspawn bugged again -
KillerStrike23 - 01.05.2014
bump *
Re: Onplayerrequestspawn bugged again -
AphexCCFC - 01.05.2014
Add that after error message code?
Re: Onplayerrequestspawn bugged again -
XK - 01.05.2014
as AphexCCFC said,check if you have
because it's a message
Re: Onplayerrequestspawn bugged again -
KillerStrike23 - 01.05.2014
sorry for multi posts its already there dude it send the player a message but it sends lots of messages for one spawn I need it to send just 1 message for every pressing shift or spawn button -_-
Re: Onplayerrequestspawn bugged again -
Konstantinos - 01.05.2014
Post OnPlayerRequestSpawn callback.
Re: Onplayerrequestspawn bugged again -
KillerStrike23 - 01.05.2014
I will post them all here its is
pawn Код:
//==========================Allowed Skins=======================================
public OnPlayerRequestSpawn(playerid){
//------------------------Admin Only Skin------------------------------------------
if(ServerInfo[AdminOnlySkins] == 1) {
if(GetPlayerSkin(playerid) == ServerInfo[AdminSkin]) {
if(PlayerInfo[playerid][Level] >= 1)
SetPlayerHealth(playerid, 100);
else {
if(PlayerInfo[playerid][Level] >= 0)
SendClientMessage(playerid, red, "You are not an admin to use admin skin");
return 0;}}}
return 1;}
but there is another for my clan if you want them I will show them later
Re: Onplayerrequestspawn bugged again -
Konstantinos - 01.05.2014
Didn't I send you the solution about a week ago? You clearly don't use what I told you and if the level is 0, it will keep sending the message.
Re: Onplayerrequestspawn bugged again -
KillerStrike23 - 01.05.2014
dude noop when player tries to choose the skin its sends no message if he weren't an admin ... or can you put the code on the mine ?
Re: Onplayerrequestspawn bugged again -
Konstantinos - 01.05.2014
Setting the health in class selections makes no sense:
pawn Код:
// global:
new bool: Player_AdminSkinWarning[MAX_PLAYERS char];
// OnPlayerConnect:
Player_AdminSkinWarning{playerid} = false;
public OnPlayerRequestSpawn(playerid)
{
//------------------------Admin Only Skin------------------------------------------
if (ServerInfo[AdminOnlySkins] && GetPlayerSkin(playerid) == ServerInfo[AdminSkin])
{
if (!PlayerInfo[playerid][Level])
{
if (!Player_AdminSkinWarning{playerid})
{
Player_AdminSkinWarning{playerid} = true;
SendClientMessage(playerid, red, "You are not an admin to use admin skin");
}
return 0;
}
}
return 1;
}