SA-MP Forums Archive
help private skins - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help private skins (/showthread.php?tid=88782)



help private skins - emuk - 28.07.2009

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



Re: help private skins - refshal - 28.07.2009

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;
}



Re: help private skins - emuk - 28.07.2009

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 ?


Re: help private skins - refshal - 28.07.2009

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;
}



Re: help private skins - D3nnis - 28.07.2009

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.


Re: help private skins - refshal - 28.07.2009

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...


Re: help private skins - emuk - 29.07.2009

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?


Re: help private skins - refshal - 29.07.2009

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;
}