SA-MP Forums Archive
Lock more then 1 team - 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: Lock more then 1 team (/showthread.php?tid=67182)



Lock more then 1 team - rp4life - 27.02.2009

Problem Fixed

Thanks to Marcel and hoodline



Edited: Not fixed


Re: Lock more skins - hoodline - 27.02.2009

Just add the cop skins to:

pawn Код:
if(SkinID == 160 || SkinID == 161 || SkinID == 125 || SkinID == 148 || SkinID == 106 || SkinID == 107)
https://sampwiki.blast.hk/wiki/Skins:Public


Re: Lock more skins - rp4life - 27.02.2009

i dont mean that i will add like the other one new team [RK] new team [LSPD] + the skins + message


Re: Lock more skins - sumwanyous - 27.02.2009

if(strfind(Nick, "[RK]", true) != -1 || strfind(Nick, "[RK]", true) != -1)

WTF?!


Re: Lock more then 1 team - hoodline - 27.02.2009

pawn Код:
public OnPlayerRequestSpawn(playerid) {
  new SkinID;
  SkinID = GetPlayerSkin(playerid);
  new Nick[MAX_PLAYER_NAME];
  GetPlayerName(playerid, Nick, sizeof(Nick));
 
  if(SkinID == 160 || SkinID == 161 || SkinID == 125 || SkinID == 148 || SkinID == 106 || SkinID == 107) {
   
   if(strfind(Nick, "[RK]", true) != -1) {
     return 1;
   } else {
     GameTextForPlayer(playerid, "~r~Skin Locked ~n~ Only for [RK] gang members !", 750, 3);
   }
 }
 else if(Skinid == Cops Skins here)
 {
    if(strfind(Nick, "[Some Other Clan Tag]", true) != -1) {
      return 1;
    } else {
      GameTextForPlayer(playerid, "~r~Skin Locked ~n~ Only for [Some Other Clan Tag] gang members !", 750, 3);
    }
    return 1;
  }
}
?


Re: Lock more then 1 team - rp4life - 27.02.2009

yea like this hoodline

but i get 1 warning

Код:
C:\Dokumente und Einstellungen\Admin\Desktop\mod (20895) : warning 209: function "OnPlayerRequestSpawn" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:     5988 bytes
Code size:     709568 bytes
Data size:     914232 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4142 cells (16568 bytes)
Total requirements: 1646172 bytes

1 Warning.



Re: Lock more then 1 team - Marcel - 27.02.2009

pawn Код:
return 1;
before the last
pawn Код:
}



Re: Lock more then 1 team - rp4life - 27.02.2009

Thanks no errors more

But now it dont lock the skins



Re: Lock more then 1 team - rp4life - 27.02.2009

ok i fixed it

return 1 to return 0

now the players without gang tags cant use any skins


Re: Lock more then 1 team - hoodline - 28.02.2009

It would be easier if you setup teams and lock to teams rather then skins