Admin sistem problem.
#1

I have this admin system.Is in romanian but i think you understand.
When i compile i get this
warning 203: symbol is never used: "kick"
warning 203: symbol is never used: "makeadmin"
Reply
#2

shows the error line...

you need to put the stock

pawn Код:
stock kick
pawn Код:
stock makeadmin
just nothing agregale stock
Reply
#3

I have 53 line and the warning show line54.
Now i will try your answer.
Reply
#4

Quote:
Originally Posted by GabiXx
Посмотреть сообщение
I have 53 line and the warning show line54.
Now i will try your answer.
ok, line which passes out warning
Reply
#5

Wooow.When i put stocks I got 14 errors.Can you show me how to create an admin system with explain please?
Reply
#6

Quote:
Originally Posted by GabiXx
Посмотреть сообщение
Wooow.When i put stocks I got 14 errors.Can you show me how to create an admin system with explain please?
14 mistakes you out, not you leave the warning?

what are the 14 errors?
Reply
#7

[pawn]
D:\JOCURI\sv\pawno\include\sscanf2.inc(101) : warning 219: local variable "name" shadows a variable at a preceding level
D:\JOCURI\sv\pawno\include\sscanf2.inc(12 : warning 219: local variable "reason" shadows a variable at a preceding level
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(13) : error 001: expected token: ";", but found "stock"
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(16) : error 001: expected token: ";", but found "-label-"
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(1 : error 010: invalid function or declaration
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(20) : error 010: invalid function or declaration
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(21) : error 010: invalid function or declaration
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(22) : error 010: invalid function or declaration
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(25) : error 010: invalid function or declaration
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(33) : error 010: invalid function or declaration
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(34) : error 010: invalid function or declaration
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(37) : error 021: symbol already defined: "kick"
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(39) : error 021: symbol already defined: "str"
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(39) : error 021: symbol already defined: "name"
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(39) : error 021: symbol already defined: "aname"
D:\JOCURI\sv\filterscripts\ADMINSIS.pwn(39) : fatal error 107: too many error messages on one line
Reply
#8

you have 2 CMD:kick?

just leave

new ID;

only this clears

new str[70];new name[MAX_PLAYER_NAME];new aname[MAX_PLAYER_NAME];new reason;
Reply
#9

I delete new ID.It's same
this is cmd kick.And i don't have 2 cmd kick.
[pawn]CMD:kick(playerid,params[])
{
new str[70];new name[MAX_PLAYER_NAME];new aname[MAX_PLAYER_NAME];new reason;
if(PlayerInfo[playerid][pAdmin] >= 1) //Aici pune conditia ca adminul jucatorului sa fie minim 1
{
if(sscanf(params,"us",ID,reason)) return SendClientMessage(playerid,COLOR_RED,"Foloseste /kick id motiv."); //declara parametrii
else if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,COLOR_RED,"Playerul nu este conectat.");//Verifica daca playerul este conectat
else //in caz ca cele 2 conditii de mai sus sunt false, se executa urmatoarea
{
Kick(ID); //da kick jucatorului pe care este executata comanda
GetPlayerName(playerid,aname,sizeof(aname)); //Ia numele playerului care executa comanda si este stocat in variabila aname
GetPlayerName(ID,name,sizeof(name)); //Ia numele playerului pe care este executata comanda si este stocat in variabila name
format(str,sizeof str,"%s a primit kick de la adminul %s, motiv: %s.",name,aname,reason); //Primul %s corespunde cu prima variabila de dupa mesaj. Exemplu: primul %s corespunde cu name, al doilea cu aname, si al 3lea cu reason. Toate 3 sunt tip de string.
SendClientMessageToAll(COLOR_RED,str);//Da mesaj tuturor
}
}else return SendClientMessage(playerid,COLOR_RED,"Trebuie sa fi admin level 1 sa utilizezi aceasta comanda.");//Daca pAdmin este 0, iti da acest mesaj
return 1;
}[pawn]
Reply
#10

serves you well?

pawn Код:
CMD:kick(playerid,params[])
{
new ID, reason[128];
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_RED,"Trebuie sa fi admin level 1 sa utilizezi aceasta comanda.");
   if(sscanf(params,"us[128]",ID,reason)) return SendClientMessage(playerid,COLOR_RED,"Foloseste /kick id motiv."); //declara parametrii
   if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,COLOR_RED,"Playerul nu este conectat.");//Verifica daca playerul este conectat
   format(str,sizeof str,"%s a primit kick de la adminul %s, motiv: %s.",pName(ID),pName(playerid),reason); //Primul %s corespunde cu prima variabila de dupa mesaj. Exemplu: primul %s corespunde cu name, al doilea cu aname, si al 3lea cu reason. Toate 3 sunt tip de string.
   SendClientMessageToAll(COLOR_RED,str);//Da mesaj tuturor
   Kick(ID); //da kick jucatorului pe care este executata comanda
   return 1;
}
define pName

pawn Код:
stock pName(playerid)
{
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  return name;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)