[HELP} - 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} (
/showthread.php?tid=102721)
[HELP} -
xxjackoxx - 17.10.2009
Ok in the server there is army which players have to apply for on forums. Certain players only have the right to choose the army skin. I was wondering is it possible to have a rocket launcher spawn so they can have a rocket launcher . i know that is possible already the thing is how can we make sure that only the army players can use it and that hackers can not spawn it?
Cheeers.
Re: [HELP} -
KingstoN* - 17.10.2009
Not tested, but maybe it's right. see and tell me
Код:
//Top of GameMode
forward ResetWeapons();
new resetweaponstimer;
//in public GameModeExitFunc()
KillTimer(resetweaponstimer);(optional)
//in public OnGameModeInit()
resetweaponstimer = SetTimer("ResetWeapons", 1000, 1);
//anywhere
public ResetWeapons()
{
for (new i=0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if (!Army && GetPlayerWeapon(i) == 39)
{
ResetPlayerWeapons(i);//Or if you prefer, you can use a kick or ban.
//Ban(i); or Kick(i);
}
}
}
}