SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 21/01/2012, 11:41 AM   #1
SkiT'aZ
Little Clucker
 
Join Date: Jan 2011
Posts: 15
Reputation: 2
Default ZCMD not Working! Need help

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
pawn Code:
#include <zcmd>

all includes
pawn Code:
#include <a_samp>
#include <float>
#include <inventory>
#include <zcmd>
#include <sscanf2>

So please help me

Last edited by SkiT'aZ; 21/01/2012 at 02:40 PM.
SkiT'aZ is offline   Reply With Quote
Old 21/01/2012, 11:45 AM   #2
|-Ruben-|
Big Clucker
 
Join Date: Oct 2011
Posts: 58
Reputation: 1
Default Re: ZCMD NOT WORKING!

You post the line under "OnPlayerCommandText"?
|-Ruben-| is offline   Reply With Quote
Old 21/01/2012, 11:56 AM   #3
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,828
Reputation: 1401
Default Re: ZCMD NOT WORKING!

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;
}
Konstantinos is offline   Reply With Quote
Old 21/01/2012, 12:00 PM   #4
ProdrifterX
Huge Clucker
 
ProdrifterX's Avatar
 
Join Date: Aug 2011
Location: drift-generation.co.cc
Posts: 211
Reputation: 4
Default Re: ZCMD NOT WORKING!

post it under onplayercommandtext
___________________________________
ProdrifterX is offline   Reply With Quote
Old 21/01/2012, 12:02 PM   #5
Tanush123
High-roller
 
Tanush123's Avatar
 
Join Date: Aug 2011
Posts: 1,022
Reputation: 65
Default Re: ZCMD NOT WORKING!

Tell all the includes you have, and it doesn't have to be under onplayercommandtext.
Tanush123 is offline   Reply With Quote
Old 21/01/2012, 12:03 PM   #6
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,828
Reputation: 1401
Default Re: ZCMD NOT WORKING!

Quote:
Originally Posted by ProdrifterX View Post
post it under onplayercommandtext
___________________________________
Don't post this in your reply

it's (AD)

Also, ZCMD Commands never inside any callback.
Konstantinos is offline   Reply With Quote
Old 21/01/2012, 12:04 PM   #7
milanosie
High-roller
 
milanosie's Avatar
 
Join Date: Dec 2011
Location: Amsterdam, Netherlands
Posts: 1,662
Reputation: 379
Default Re: ZCMD NOT WORKING!

[QUOTE=ProdrifterX;1638019]post it under onplayercommandtext
___________________________________
**PICTURE CENSORED FOR ADVERTISING**

no.. dont do that with ZCMD
milanosie is offline   Reply With Quote
Old 21/01/2012, 12:12 PM   #8
RoleplayEditor
Huge Clucker
 
RoleplayEditor's Avatar
 
Join Date: May 2011
Location: At my server :P
Posts: 214
Reputation: 25
Default Re: ZCMD NOT WORKING!

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
pawn Code:
OnPlayerCommandText

Then write it and it will work
__________________
Hey
RoleplayEditor is offline   Reply With Quote
Old 21/01/2012, 12:14 PM   #9
Tanush123
High-roller
 
Tanush123's Avatar
 
Join Date: Aug 2011
Posts: 1,022
Reputation: 65
Default Re: ZCMD NOT WORKING!

Quote:
Originally Posted by RoleplayEditor View Post
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
pawn Code:
OnPlayerCommandText

Then write it and it will work
That doesn't do anything, i have public OnPlayerCommandText and my zcmd commands work fine.
Tanush123 is offline   Reply With Quote
Old 21/01/2012, 01:26 PM   #10
milanosie
High-roller
 
milanosie's Avatar
 
Join Date: Dec 2011
Location: Amsterdam, Netherlands
Posts: 1,662
Reputation: 379
Default Re: ZCMD NOT WORKING!

and remove the space

pawn Code:
cmd:pagalba(playerid, params[])
milanosie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working ZCMD /invite No Fear Scripting Help 6 03/01/2012 10:37 AM
Some Zcmd Aint working Buzzbomb Scripting Help 4 19/12/2011 06:53 AM
ZCMD Siren Not Working Smithy Scripting Help 1 30/11/2011 12:09 PM
ZCMD not working in samp 0.3c R5 MickJ Scripting Help 3 18/11/2011 06:08 AM
MoveObject not working (zcmd) [NTX]MikeQ Help Archive 5 01/06/2010 07:04 PM


All times are GMT. The time now is 05:44 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.