help private skins
#1

how do I put the skins reserved for members of the clan?whit
written "skin reserved".
I tried searching but I do not work
sorry for my bad english
thanks
Reply
#2

Try something like this:

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new skin;
skin = GetPlayerSkin(playerid);
if(skin == TheReservedSkinID && IsPlayerInYourClan == 0) // Change the "TheReservedSkinID" to the reserved skin ID, and change "IsPlayerInYourClan" to your player clan data
{
GameTextForPlayer(playerid, "~w~SKIN RESERVED", 3000, 3);
return 1;
}
return 1;
}
Reply
#3

i have done so:
Код:
public OnPlayerRequestSpawn(playerid)
{
new skin;
skin = GetPlayerSkin(playerid);
if(skin == 10 && [TcB]EmuK == 0) // Change the "TheReservedSkinID" to the reserved skin ID, and change "IsPlayerInYourClan" to your player clan data
{
GameTextForPlayer(playerid, "~w~SKIN RESERVED", 3000, 3);
return 1;
}
return 1;
}
but
Код:
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\tokyofinalv3.pwn(1560) : error 029: invalid expression, assumed zero
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\tokyofinalv3.pwn(1560) : error 017: undefined symbol "TcB"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\tokyofinalv3.pwn(1560) : error 029: invalid expression, assumed zero
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\tokyofinalv3.pwn(1560) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
why ?
Reply
#4

You can't use your nickname like that. If you want the skin to only be available for you (with your nickname), then try something like this:

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new skin;
new name[MAX_PLAYER_NAME];
skin = GetPlayerSkin(playerid);
GetPlayerName(playerid, name, sizeof(name));
if(skin == 10 && strcmp(name, "[TcB]EmuK", false))
{
GameTextForPlayer(playerid, "~w~SKIN RESERVED", 3000, 3);
return 1;
}
return 1;
}
Reply
#5

Quote:
Originally Posted by еddy
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new skin;
new name[MAX_PLAYER_NAME];
skin = GetPlayerSkin(playerid);
GetPlayerName(playerid, name, sizeof(name));
if(skin == 10 && strcmp(name, "[TcB]EmuK", false))
{
GameTextForPlayer(playerid, "~w~SKIN RESERVED", 3000, 3);
return 1;
}
return 1;
}
After "GameTextForPlayer(playerid, "~w~SKIN RESERVED", 3000, 3);" you should use "return 0;"
otherwise the player will be spawn anyway.
Reply
#6

Quote:
Originally Posted by D3nnis
Quote:
Originally Posted by еddy
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new skin;
new name[MAX_PLAYER_NAME];{
GameTextForPlayer(playerid, "~w~SKIN RESERVED", 3000, 3);
return 1;
}
skin = GetPlayerSkin(playerid);
GetPlayerName(playerid, name, sizeof(name));
if(skin == 10 && strcmp(name, "[TcB]EmuK", false))

return 1;
}
After "GameTextForPlayer(playerid, "~w~SKIN RESERVED", 3000, 3);" you should use "return 0;"
otherwise the player will be spawn anyway.
Oh yeah? Convince me... I've tried this with returning 1 like a million times, and it worked...
Reply
#7

i have done so but the skin anyone can use the and i want the written on select skin not
after it has been chosen, is it possible?
Reply
#8

Then it should look like this:

pawn Код:
#include <a_samp>

public OnPlayerRequestClass(playerid, classid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(classid == 10 && strcmp(name, "[TcB]EmuK", false))
{
GameTextForPlayer(playerid, "~w~SKIN RESERVED", 3000, 3);
return 1;
}
return 1;
}

public OnPlayerRequestSpawn(playerid)
{
new skin;
new name[MAX_PLAYER_NAME];
skin = GetPlayerSkin(playerid);
GetPlayerName(playerid, name, sizeof(name));
if(skin == 10 && strcmp(name, "[TcB]EmuK", false))
{
GameTextForPlayer(playerid, "~w~SKIN RESERVED", 3000, 3);
return 1;
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)