#1

Warning: C:\Users\kuldar\Documents\samp\filterscripts\lol.p wn(493) : warning 203: symbol is never used: "dcmd_setlevel"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.


there is no table or what thing is that numbered as 493
there is 492

pawn Код:
dcmd_setlevel(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] != 10) return SendClientMessage(playerid, 0xFF0000AA, "{FFDF00}KTW: {FFFFFF} Be teh baws for this cmd");
    {
        new targetid, level;
        if(sscanf(params, "ud", targetid, level)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setlevel [playerid | name] [level]");
        else if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFF0000AA, "{FFDF00}KTW: {FFFFFF}Player not found");
        {
            new targetname[MAX_PLAYER_NAME], string[44];
            GetPlayerName(targetid, targetname, sizeof(targetname));
            PlayerInfo[targetid][AdminLevel] = level;
            format(string, sizeof(string), "{FFDF00}KTW: {FFFFFF}You have set player %s to AdminLevel %s", targetname, level);
            SendClientMessage(playerid, 0xFF0000AA, string);
        }
    }
    return 1;
}
Reply
#2

Why you work with dcmd?? Dude use ZCMD much better
Reply
#3

Seems like you're gamemode is using ZCMD while this command is using dcmd_*

Код:
COMMAND:setlevel(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] != 10) return SendClientMessage(playerid, 0xFF0000AA, "{FFDF00}KTW: {FFFFFF} Be teh baws for this cmd");
    {
		new targetid, level;
	    if(sscanf(params, "ud", targetid, level)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setlevel [playerid | name] [level]");
	    else if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFF0000AA, "{FFDF00}KTW: {FFFFFF}Player not found");
	    {
	        new targetname[MAX_PLAYER_NAME], string[44];
	        GetPlayerName(targetid, targetname, sizeof(targetname));
	        PlayerInfo[targetid][AdminLevel] = level;
	        format(string, sizeof(string), "{FFDF00}KTW: {FFFFFF}You have set player %s to AdminLevel %s", targetname, level);
	        SendClientMessage(playerid, 0xFF0000AA, string);
	    }
    }
    return 1;
}
If not, read & download https://sampforum.blast.hk/showthread.php?tid=91354 and include it in your gamemode.
Reply
#4

Quote:
Originally Posted by Flake.
Посмотреть сообщение
Seems like you're gamemode is using ZCMD while this command is using dcmd_*

Код:
COMMAND:setlevel(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] != 10) return SendClientMessage(playerid, 0xFF0000AA, "{FFDF00}KTW: {FFFFFF} Be teh baws for this cmd");
    {
		new targetid, level;
	    if(sscanf(params, "ud", targetid, level)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setlevel [playerid | name] [level]");
	    else if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFF0000AA, "{FFDF00}KTW: {FFFFFF}Player not found");
	    {
	        new targetname[MAX_PLAYER_NAME], string[44];
	        GetPlayerName(targetid, targetname, sizeof(targetname));
	        PlayerInfo[targetid][AdminLevel] = level;
	        format(string, sizeof(string), "{FFDF00}KTW: {FFFFFF}You have set player %s to AdminLevel %s", targetname, level);
	        SendClientMessage(playerid, 0xFF0000AA, string);
	    }
    }
    return 1;
}
If not, read & download https://sampforum.blast.hk/showthread.php?tid=91354 and include it in your gamemode.
Whole script is in dcmd, it's a admin FS, which i tried to make.
I'll see, gonna re-write scripts to z_cmd
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)