18.02.2015, 12:31
Hello.
I have a problem with zcmd command "setlevel". I made it and it give me some errors:
Command:
Error:
My enum:
Includes:
If u can help me i would really like to +REPP you!
I have a problem with zcmd command "setlevel". I made it and it give me some errors:
Command:
PHP код:
COMMAND:setlevel(playerid,params[])
{
new id,level,msg[128],name[MAX_PLAYER_NAME];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Error: Nemate dozvolu za tu komandu.");
else
{
if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid, 0xFFFFFF,"Koristenje: /setlevel (Ime/ID) (Level)");
else if(level > 5) return SendClientMessage(playerid, 0xFFFFFF,"Error: Maximalni level admin je 5.");
else
{
PlayerInfo[id][pAdministrator] = level;
format(msg,sizeof(msg),"Cestitamo! Sada ste admin na levelu %d",level);
SendClientMessage(id,0xFFFFFF,msg);
GetPlayerName(id,name,sizeof(name));
format(msg,sizeof(msg),"Postavili ste admina %s na levelu %d", name,level);
SendClientMessage(playerid,0xFFFFFF,msg);
}
}
return 1;
}
PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(87) : error 017: undefined symbol "PlayerInfo"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(96) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
PHP код:
enum pInfo
{
pPassword,
pNovac,
pAdministrator,
pUbojstva,
pBankNovac,
pSmrti
}
new PlayerInfo[MAX_PLAYERS][pInfo];
PHP код:
#include <a_samp>
#include <YSI\y_ini>
#include <zcmd>
#include <sscanf2>