Help Command
#1

Can somebody tell me how to set an Admin and Game Shark level, only Admin And Game Shark to use it on dcmd cmd
Код:
dcmd_radio(playerid, params[])
{
            #pragma unused params
            ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
            return SendClientMessage(playerid,COLOR_GREEN,"Chouse some option what you need.");
    }
y don't now about dcmd :S
Reply
#2

I will do for you in strcmp :

pawn Код:
if(strcmp("/radio", cmdtext, true) == 0)
{
       ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
       SendClientMessage(playerid,COLOR_GREEN,"Chouse some option what you need.");
       return 1;
}
Reply
#3

isn't working on Strcmp y tried
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp("/radio", cmdtext, true) == 0)
    {
	   if(PlayerInfo[playerid][pAdmin] >= 1)
       ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
       SendClientMessage(playerid,COLOR_GREEN,"Chouse some option what you need.");
       return 1;
    }
	return 0;
}

enum pInfo
{
   pAdmin
};

new PlayerInfo[MAX_PLAYERS][pInfo];
the script is running but everyone can play music
Reply
#4

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/radio", cmdtext, true) == 0)
    {
       if(PlayerInfo[playerid][pAdmin] >= 1)
       ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
       SendClientMessage(playerid,COLOR_GREEN,"Chouse some option what you need.");
       }
    }
    else return SendClientMessage(playerid, COLOR_GREEN, "You must be admin to use this command!");
    return 1;
    }
    return 0;
}
Does that work?
Reply
#5

C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\music.pwn(113) : error 010: invalid function or declaration
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\music.pwn(114) : error 010: invalid function or declaration
C:\Users\pc\Desktop\GameModovi\Beyond GAME MOD\filterscripts\music.pwn(116) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#6

For RconAdmin
pawn Код:
dcmd_radio(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid,-1,"You aren't an Rcon Admin");

    #pragma unused params
    ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
    SendClientMessage(playerid,COLOR_GREEN,"Chouse some option what you need.");
    return true;
}
Reply
#7

Quote:
Originally Posted by ThomasP
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/radio", cmdtext, true) == 0)
    {
       if(PlayerInfo[playerid][pAdmin] >= 1)
       ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
       SendClientMessage(playerid,COLOR_GREEN,"Chouse some option what you need.");
       }
    }
    else return SendClientMessage(playerid, COLOR_GREEN, "You must be admin to use this command!");
    return 1;
    }
    return 0;
}
Does that work?
That's wrong.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/radio", cmdtext, true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
           ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
           SendClientMessage(playerid,COLOR_GREEN,"Chouse some option what you need.");
        }
        SendClientMessage(playerid, COLOR_GREEN, "You must be admin to use this command!");
        return 1;
    }
    return 0;
}
Reply
#8

i Don't want for rcon...

Something is false
y type /radio and y don't have promision, y make admin level 2 and y type /radio it show's me again You must be admin to use this command! what's rong ?
Reply
#9

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/radio", cmdtext, true) == 0) {
        if(PlayerInfo[playerid][pAdmin] >= 1) {
            ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
            SendClientMessage(playerid,COLOR_GREEN,"Chouse some option what you need.");
        }
        else {
            SendClientMessage(playerid, COLOR_GREEN, "You must be admin to use this command!");
        }
        return 1;
    }
    return 0;
}
Just noticed my last one was wrong . This one compiles with no errors ;3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)