[HELP] How to let not people use Army skin.
#1

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.

Reply
#2

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.
Reply
#3

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

help please?
Reply
#4

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

and then use his code
Reply
#5

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..
Reply
#6

Код:
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
Reply
#7

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..
Reply
#8

#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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)