How Can I Make That ..? - 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: How Can I Make That ..? (
/showthread.php?tid=613416)
How Can I Make That ..? -
RamzyR - 27.07.2016
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(playerid, 12112, DIALOG_STYLE_MSGBOX, "Checked!", "You are an administrator..!", "OK", "");
return 1;
}
Re: How Can I Make That ..? -
Deadpoop - 27.07.2016
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(playerid, 12112, DIALOG_STYLE_MSGBOX, "Checked!", "You are an administrator..!", "OK", "");
return 1;
}
Re: How Can I Make That ..? -
Stinged - 27.07.2016
Код:
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.
Re: How Can I Make That ..? -
RamzyR - 27.07.2016
Thank You Twice
Deadpoopand
Stinged
The Two Ways Worked
Re: How Can I Make That ..? - WhiteGhost - 27.07.2016
Quote:
Originally Posted by RamzyR
Thank You Twice Deadpoopand Stinged
The Two Ways Worked
|
Lol,there the same..
Re: How Can I Make That ..? -
RamzyR - 27.07.2016
Quote:
Originally Posted by WhiteGhost
Lol,there the same..
|
So
Re: How Can I Make That ..? -
J0sh... - 27.07.2016
Quote:
Originally Posted by WhiteGhost
Lol,there the same..
|
One has 2 if statements (and that's not needed).
The other has one.
Re: How Can I Make That ..? -
Lirbo - 27.07.2016
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;
}