ZCMD NOT WORKING! - 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: ZCMD NOT WORKING! (
/showthread.php?tid=312395)
ZCMD not Working! Need help -
SkiT'aZ - 21.01.2012
I have simple cmd like:
pawn Code:
CMD:pagalba(playerid,params[])
{
SendClientMessage(playerid,GREY,"Sveiki atvykж б Zombie Apocalypse Roleplay");
SendClientMessage(playerid,GREY,"Animacijos - /anim");
SendClientMessage(playerid,GREY,"Inventorius - mygtukas Y");
SendClientMessage(playerid,GREY,"Mыsш Forumas: zarp.forumup.lt");
return 1;
}
And when in game I type /pagalba it just do nothing and even don't show "server: unknown command" or something
I've got
all includes
pawn Code:
#include <a_samp>
#include <float>
#include <inventory>
#include <zcmd>
#include <sscanf2>
So please help me
Re: ZCMD NOT WORKING! -
|-Ruben-| - 21.01.2012
You post the line under "OnPlayerCommandText"?
Re: ZCMD NOT WORKING! -
Konstantinos - 21.01.2012
pawn Code:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
// No Commands HERE
return 0;
}
CMD:pagalba( playerid, params[ ] )
{ // Commands out of callbacks
SendClientMessage( playerid, GREY, "Sveiki atvykж б Zombie Apocalypse Roleplay" );
SendClientMessage( playerid, GREY, "Animacijos - /anim" );
SendClientMessage( playerid, GREY, "Inventorius - mygtukas Y" );
SendClientMessage( playerid, GREY, "Mыsш Forumas: zarp.forumup.lt" );
return 1;
}
public OnPlayerText( playerid, text[ ] )
{
// An Example of second Callback
return 1;
}
Re: ZCMD NOT WORKING! -
ProdrifterX - 21.01.2012
post it under onplayercommandtext
___________________________________
Re: ZCMD NOT WORKING! -
Tanush123 - 21.01.2012
Tell all the includes you have, and it doesn't have to be under onplayercommandtext.
Re: ZCMD NOT WORKING! -
Konstantinos - 21.01.2012
Quote:
Originally Posted by ProdrifterX
post it under onplayercommandtext
___________________________________

|
Don't post this in your reply

it's (AD)
Also, ZCMD Commands never inside any callback.
Re: ZCMD NOT WORKING! -
milanosie - 21.01.2012
[QUOTE=ProdrifterX;1638019]post it under onplayercommandtext
___________________________________
**PICTURE CENSORED FOR ADVERTISING**
no.. dont do that with ZCMD
Re: ZCMD NOT WORKING! -
RoleplayEditor - 21.01.2012
pawn Code:
cmd:pagalba (playerid, params[])
{
SendClientMessage(playerid,GREY,"Sveiki atvykж б Zombie Apocalypse Roleplay");
SendClientMessage(playerid,GREY,"Animacijos - /anim");
SendClientMessage(playerid,GREY,"Inventorius - mygtukas Y");
SendClientMessage(playerid,GREY,"Mыsш Forumas: zarp.forumup.lt");
return 1;
}
Note Delete this line
Then write it and it will work
Re: ZCMD NOT WORKING! -
Tanush123 - 21.01.2012
Quote:
Originally Posted by RoleplayEditor
pawn Code:
cmd:pagalba (playerid, params[]) { SendClientMessage(playerid,GREY,"Sveiki atvykж б Zombie Apocalypse Roleplay"); SendClientMessage(playerid,GREY,"Animacijos - /anim"); SendClientMessage(playerid,GREY,"Inventorius - mygtukas Y"); SendClientMessage(playerid,GREY,"Mыsш Forumas: zarp.forumup.lt"); return 1; }
Note Delete this line
Then write it and it will work 
|
That doesn't do anything, i have public OnPlayerCommandText and my zcmd commands work fine.
Re: ZCMD NOT WORKING! -
milanosie - 21.01.2012
and remove the space
pawn Code:
cmd:pagalba(playerid, params[])