Locking 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)
+--- Thread: Locking skins. (
/showthread.php?tid=612484)
Locking skins. -
canip0000 - 18.07.2016
Ok, so I want to lock skins, but other players will be able to get the same skin locked. So I thought that I could do
pawn Код:
new emmetskin;
emmetskin = addplayerclass etc....
pawn Код:
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
if( GetPlayerSkin (playerid) == emmetskin) // edit to the private skin
{
if(!strcmp(Name,"[EP]VACANT")) // Edit this
{
SendClientMessage(playerid,COLOR_RED,"SERVER: Sup.");
}
else
{
ForceClassSelection(playerid);
SendClientMessage(playerid, COLOR_RED ,"SERVER This skin is locked for [EP]VACANT");
}
}
if(gTeam[playerid] == TEAM_HOODRAT ) {
{
SendClientMessage(playerid, COLOR_GREY, "SERVER: Type /hoodrats to see more information.");
return 1;
}
}
anyone answer me why this is not working??
Re: Locking skins. -
GangstaSunny - 18.07.2016
The player will not return to class selection until they re-spawn. This can be achieved with TogglePlayerSpectating.
PHP код:
if( GetPlayerSkin (playerid) == emmetskin) // edit to the private skin
{
if(!strcmp(Name,"[EP]VACANT")) // Edit this
{
SendClientMessage(playerid,COLOR_RED,"SERVER: Sup.");
}
else
{
ForceClassSelection(playerid);
TogglePlayerSpectating(playerid, true);
TogglePlayerSpectating(playerid, false);
SendClientMessage(playerid, COLOR_RED ,"SERVER This skin is locked for [EP]VACANT");
}
}