admin skins
#1

Hi hi

i searched alot of topics about this thing and no one works..

anyone know how i can put it?

i want a private skin only for admin level 2 or superior..
Reply
#2

Quote:
Originally Posted by Rat_
Hi hi

i searched alot of topics about this thing and no one works..

anyone know how i can put it?

i want a private skin only for admin level 2 or superior..
pawn Code:
if(classid == skinid)
{
if(PlayerInfo[playerid][AdminLevel] >= 2)
{
SetPlayerSkin(playerid,skinid);
SendClientMessage(playerid, 0xFFFFFFF, "Welcome !");
return 1;
}
else
{
SendClientMessage(playerid, 0xFFFFFFF, "You are not an admin !");
}
}
Reply
#3

Where put that, in OnPlayerSpawn ?
Reply
#4

Onplayerrequestclass?
Reply
#5

it gives me 4 errors

Code:
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(131) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(131) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(132) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(132) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(133) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(133) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(949) : warning 205: redundant code: constant expression is zero
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(951) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(951) : warning 215: expression has no effect
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(951) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(951) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Propietario\Escritorio\SAAAAMP\gamemodes\TClanServ.pwn(951) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#6

At the top
Code:
gPlayerClass[MAX_PLAYERS];
Then create an admin skin like so:
Code:
adminskin = AddPlayerClass(.......................);
Under
Code:
public OnPlayerRequestClass(playerid,classid)
{
  gPlayerClass[playerid]=classid;
}
Code:
public OnPlayerRequestSpawn(playerid)
{
  if(gPlayerClass[playerid] == adminskin && if(PlayerInfo[playerid][pAdmin] < 2)) //use your own variables here for "PlayerInfo...."
  {
    SendClientMessage(playerid,0xff0000aa,"This skin is for admins only.");
    return 0;
  }
  return 1;
}
Should work.
Reply
#7

what is that?

Code:
  if(gPlayerClass[playerid] == adminskin && if(PlayerInfo[playerid][pAdmin] < 2)) //use your own variables here for "PlayerInfo......"
Reply
#8

You mean about the PlayerInfo ?
You must be saving the player stats and variables in some other enum and arrays. Just rename the PlayerInfo to whatever you are using.
Reply
#9

how i can know what i use??
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)