SA-MP Forums Archive
Help Command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help Command (/showthread.php?tid=333526)



Help Command - 3RoR - 11.04.2012

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


Re: Help Command - .FuneraL. - 11.04.2012

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;
}



Re: Help Command - 3RoR - 11.04.2012

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


Re: Help Command - [jS]Thomas - 11.04.2012

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?


Re: Help Command - 3RoR - 11.04.2012

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.


Re: Help Command - ViniBorn - 11.04.2012

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;
}



Re: Help Command - The__ - 11.04.2012

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;
}



Re: Help Command - 3RoR - 11.04.2012

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 ?


Re: Help Command - [jS]Thomas - 11.04.2012

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