SA-MP Forums Archive
[HELP] How to let not people use Army skin. - 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] How to let not people use Army skin. (/showthread.php?tid=117676)



[HELP] How to let not people use Army skin. - Evangek - 01.01.2010

hey guys im making an Cops 'n Robbers , but im kinda new and i want to know how i let people block if their CanUseArmy = 0 (if its 0 they cant use army , and if its 1 they can)

Can you guys help me?


thanks.




Re: [HELP] How to let not people use Army skin. - KnooL - 01.01.2010

OnPlayerRequestClass
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
  if(classid == 287 && CanUseArmy[playerid] == 0)
  {
    SendClientMessage(playerid,COLOR_YELLOW,"You can't use the army skin.");
    return 0;
}
that'll do the job, untested and I don't know if it works.


Re: [HELP] How to let not people use Army skin. - Evangek - 01.01.2010

it doesnt work , i dont get errors but it doesnt work!

help please?


Re: [HELP] How to let not people use Army skin. - Oxside - 01.01.2010

at the top of your script (under includes) new CanUseArmy[MAX_PLAYERS];

and then use his code


Re: [HELP] How to let not people use Army skin. - Evangek - 01.01.2010

i already have! but it doesnt work when i have it on OnPlayerRequestClass.. the text doesnt show , and i can just use it when my canusearmy is 0..



Re: [HELP] How to let not people use Army skin. - Oxside - 01.01.2010

Код:
public OnPlayerRequestClass(playerid, classid)
{
  if(classid == 287 && CanUseArmy[playerid] == 0)
  {
    SendClientMessage(playerid,COLOR_YELLOW,"You can't use the army skin.");
   }
   return 0;
}
]

try now


Re: [HELP] How to let not people use Army skin. - Evangek - 01.01.2010

Quote:
Originally Posted by Oxside
Код:
public OnPlayerRequestClass(playerid, classid)
{
  if(classid == 287 && CanUseArmy[playerid] == 0)
  {
    SendClientMessage(playerid,COLOR_YELLOW,"You can't use the army skin.");
   }
   return 0;
}
]

try now
Код:
C:\Documents and Settings\Eigenaar\Mijn documenten\Wouter zn server 2\gamemodes\evan.pwn(177) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Eigenaar\Mijn documenten\Wouter zn server 2\gamemodes\evan.pwn(208) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Mijn documenten\Wouter zn server 2\gamemodes\evan.pwn(210) : warning 225: unreachable code
C:\Documents and Settings\Eigenaar\Mijn documenten\Wouter zn server 2\gamemodes\evan.pwn(210) : warning 217: loose indentation
C:\Documents and Settings\Eigenaar\Mijn documenten\Wouter zn server 2\gamemodes\evan.pwn(607) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Warnings.
help?
and ingame i dont see the skins anymore.. and cant spawn..


Re: [HELP] How to let not people use Army skin. - Oxside - 01.01.2010

#pragma unused ret_memcpy << Top of script under includes.
http://dracoblue.net/tidy/pawn/ << Use this to fix indentation warnings or put the following at the top to ignore it:
#pragma tabsize 0

we cant help you with line 177 and 210 because we dont know what is on that line