Private Skin Help
#1

solved
Reply
#2

if(!(strcmp(SkinName, "Apex", false) == 0))

change to:

if(strcmp(SkinName, "Apex", false) == 0)
Reply
#3

Hi you can use that :
in callback OnPlayerSpawn
Код:
    if(strcmp(pname, "Miller007", true) == 0)//here your surname in game
	{
	SetPlayerSkin(playerid, 100);
	return 0;
    }
Reply
#4

You should use it in the callback OnPlayerRequestSpawn because it'll prevent the player from clicking Spawn and using the skin.
Reply
#5

Quote:
Originally Posted by 1nspire
Посмотреть сообщение
if(!(strcmp(SkinName, "Apex", false) == 0))

change to:

if(strcmp(SkinName, "Apex", false) == 0)
now i can spawn it with other names too :P
Reply
#6

Thanks guyz i got it
Reply
#7

PHP код:
public OnPlayerRequestSpawn(playerid)
{
    if(
GetPlayerSkin(playerid) == 26)
    {
        new 
SkinName[MAX_PLAYER_NAME];
        
GetPlayerName(playeridSkinNamesizeof(SkinName));
        if(!
strcmp(SkinName"Apex"false))
        {    
            
SendClientMessage(playerid,red,"This Skin For Apex Only");
            return 
0;
        }
    }
    return 
1;

Not sure if it works.

EDIT: Didn't see you solved it, good to here.
OnPlayerRequestClass is when the player switches to a new classid.
OnPlayerRequestSpawn is when the player clicks the spawn button.
Reply
#8

Del please.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)