How Can I Make That ..?
#1

This CMD is Just a Test ! I want to Know How Can I make <>If Normal Player Used The Command it Send Msg "You are Not High Enough Level To Use This Command"

PHP код:
CMD:test(playerid,params[]) {
if (
PlayerInfo[playerid][Level] >= 1)
    
ShowPlayerDialog(playerid12112DIALOG_STYLE_MSGBOX"Checked!""You are an administrator..!""OK""");
        return 
1;

Reply
#2

PHP код:
PHP Code:
CMD:test(playerid,params[]) { 
if (
PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid, -1"you are not high enough to use this cmd!");
if (
PlayerInfo[playerid][Level] >= 1
    
ShowPlayerDialog(playerid12112DIALOG_STYLE_MSGBOX"Checked!""You are an administrator..!""OK"""); 
        return 
1

Reply
#3

Код:
CMD: ...
{
    if (PlayerInfo[playerid][Level] < 1)
        return SendClientMessage(playerid, 0xFF0000FF, "your message here");
    // what you want the command to do
    return 1;
}
I'm on my phone so I might have written a function incorrectly.

And Deadpoop, you shouldn't check twice.
Reply
#4

Thank You Twice Deadpoopand Stinged

The Two Ways Worked
Reply
#5

Quote:
Originally Posted by RamzyR
Посмотреть сообщение
Thank You Twice Deadpoopand Stinged

The Two Ways Worked
Lol,there the same..
Reply
#6

Quote:
Originally Posted by WhiteGhost
Посмотреть сообщение
Lol,there the same..
So
Reply
#7

Quote:
Originally Posted by WhiteGhost
Посмотреть сообщение
Lol,there the same..
One has 2 if statements (and that's not needed).
The other has one.
Reply
#8

PHP код:
CMD:test(playerid,params[])
{
    if(
PlayerInfo[playerid][Level]<1) return SendClientMessage(playerid,0xFF0000FF,"Error: You're not an administrator");
    
SendClientMessage(playerid,0x00FF00FF,"You're an administrator!");
    return 
1;

Reply


Forum Jump:


Users browsing this thread: