Unknown Known Command :D - 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: Unknown Known Command :D (
/showthread.php?tid=550541)
Unknown Known Command :D -
nezo2001 - 13.12.2014
Here is the command
PHP код:
CMD:weapons(playerid, params[])
{
if(PInfo[playerid][Army]) {
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "AK47\nM4\nSniper Rifle", "Buy", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not an army officer !");
}
}
When i type it, it work and the dialog apear and the dialog work but at the same time it send me a client message that this command is unknow.
Please Help,REP++
Re: Unknown Known Command :D -
Bingo - 13.12.2014
Where's '
Re: Unknown Known Command :D -
nezo2001 - 13.12.2014
Quote:
Originally Posted by Bingo
|
I said before that i am a little bit donkey btw REP
and whats about the message that i have sent to You ??
Re: Unknown Known Command :D -
Bingo - 13.12.2014
pawn Код:
CMD:weapons(playerid, params[])
{
if(PInfo[playerid][Army]) {
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "AK47\nM4\nSniper Rifle", "Buy", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not an army officer!");
return 1;
}
}
Re: Unknown Known Command :D -
nezo2001 - 13.12.2014
Quote:
Originally Posted by Bingo
pawn Код:
CMD:weapons(playerid, params[]) { if(PInfo[playerid][Army]) { ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "AK47\nM4\nSniper Rifle", "Buy", "Cancel"); } else { SendClientMessage(playerid, COLOR_RED, "You are not an army officer!"); return 1; } }
|
Ok what about the message !!
Re: Unknown Known Command :D -
Kaperstone - 13.12.2014
Quote:
Originally Posted by Bingo
pawn Код:
CMD:weapons(playerid, params[]) { if(PInfo[playerid][Army]) { ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "AK47\nM4\nSniper Rifle", "Buy", "Cancel"); } else { SendClientMessage(playerid, COLOR_RED, "You are not an army officer!"); return 1; } }
|
Ehh not in the right place.
pawn Код:
CMD:weapons(playerid, params[])
{
if(PInfo[playerid][Army]) {
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "AK47\nM4\nSniper Rifle", "Buy", "Cancel");
}else{
SendClientMessage(playerid, COLOR_RED, "You are not an army officer!");
}
return 1;
}
Each command and callback should return a value of 1 or 0.
Returning 0 or not at all in a command will return "Unknown command"
Re: Unknown Known Command :D -
nezo2001 - 13.12.2014
......
Re: Unknown Known Command :D -
Rog - 13.12.2014
wht is the gm? hope i can be mapper/scripter
Re: Unknown Known Command :D -
nezo2001 - 13.12.2014
.....