Posts: 701
Threads: 91
Joined: Mar 2012
Hello,
i have Vip cmds so i need that only vip can use it !@!
i saved vip by :
Код:
enum pInfo {
Logged,
Password,
AdminLevel,
Vip,
Cash,
Score,
Ip[20],
IsBanned
}
Heres cmd :
Код:
if (strcmp("/vheal", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, white, "You Have Been Healed !");
return 1;
}
Hope you Help me !
Thanks
Posts: 701
Threads: 91
Joined: Mar 2012
errors :
Код:
E:\Server\gamemodes\galaxy.pwn(266) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
E:\Server\gamemodes\galaxy.pwn(266) : warning 215: expression has no effect
E:\Server\gamemodes\galaxy.pwn(266) : error 001: expected token: ";", but found "]"
E:\Server\gamemodes\galaxy.pwn(266) : error 029: invalid expression, assumed zero
E:\Server\gamemodes\galaxy.pwn(266) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Posts: 199
Threads: 1
Joined: Jul 2012
Reputation:
0
Did you read what newbienoob said? He said 'if(pInfo[playerid][VIP]) //change this', do you know what change mean? Change the pInfo by your defined symbol, maybe PlayerInfo or something like that. Give us the line under the enum of pInfo and we will be able to help you.
Posts: 701
Threads: 91
Joined: Mar 2012
Still same errors :
Код:
E:\Server\gamemodes\galaxy.pwn(267) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
E:\Server\gamemodes\galaxy.pwn(267) : warning 215: expression has no effect
E:\Server\gamemodes\galaxy.pwn(267) : error 001: expected token: ";", but found "]"
E:\Server\gamemodes\galaxy.pwn(267) : error 029: invalid expression, assumed zero
E:\Server\gamemodes\galaxy.pwn(267) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Posts: 701
Threads: 91
Joined: Mar 2012
Quote:
Originally Posted by Vince
God, are you retarded? Two people have already said that you need to input your own variable where it says "//change this"!
pawn Код:
if(PlayerInfo[playerid][VIP]) //change this
|
See now :
Код:
if (strcmp("/vheal", cmdtext, true, 5) == 0)
{
if(pInfo[playerid][Vip]) //change this
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, white, "You Have Been Healed !");
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not VIP to use this command");
}
return 1;
}
and :
Код:
enum pInfo {
Logged,
Password,
AdminLevel,
Vip,
Cash,
Score,
Ip[20],
IsBanned
}
Still errors