SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 20/03/2012, 01:07 PM   #11
Twisted_Insane
Gangsta
 
Twisted_Insane's Avatar
 
Join Date: Feb 2012
Posts: 986
Reputation: 94
Default Re: ZCMD - Commands collection [PART 1]

Show me your kick-command, you probably got some mistakes!
__________________
Join the BEST Gangwar-server ever; Los Santos Gangwars!
http://forum.sa-mp.com/showthread.ph...42#post2235842
^ Read!

Any problems with ZCMD-commands? Simply PM me your topic or check out the tutorial(s) in my signature, more'll come soon!

Twisted_Insane is offline   Reply With Quote
Old 01/04/2012, 08:31 PM   #12
Wickeed
Big Clucker
 
Join Date: Jan 2012
Posts: 60
Reputation: 1
Default Re: ZCMD - Commands collection [PART 1]

I got same Errors
pawn Code:
(210) : error 010: invalid function or declaration
(214) : error 010: invalid function or declaration
(235) : error 010: invalid function or declaration
(239) : error 010: invalid function or declaration
(403) : warning 203: symbol is never used: "ban"
(403) : warning 203: symbol is never used: "kick"
and code
pawn Code:
format(str, sizeof(str), "'%s' has been kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason);
    SendClientMessageToAll(COLOUR_RED, str);
    Kick(PID);
    }
    else //rove 209
    {
        SendClientMessage(playerid, COLOR_GREY, "You have to be level 3 to use that command!");
    }
    return 1;//rove 213
}
////////////////////////////////////////////////////////////////////////////////////
        Ban(PID);

        }
        else //rove 233
        {
            SendClientMessage(playerid, COLOR_GREY, "You have to be level 5 to use that command!");
        }
        return 1;//rove 237
    }
Hope someone can help me with this error ^^
__________________


Hate this without reason...
Wickeed is offline   Reply With Quote
Old 01/04/2012, 09:05 PM   #13
Twisted_Insane
Gangsta
 
Twisted_Insane's Avatar
 
Join Date: Feb 2012
Posts: 986
Reputation: 94
Default Re: ZCMD - Commands collection [PART 1]

You sure you have the newest sscanf2 include / plugin? Also, try it like this:

pawn Code:
else return SendClientMessage(playerid, COLOR_RED, "You need to be level 2 to use that command!");

Delete the "else-statement" you have right now and replace it with the new one! If it didn't work, show me your whole command!
__________________
Join the BEST Gangwar-server ever; Los Santos Gangwars!
http://forum.sa-mp.com/showthread.ph...42#post2235842
^ Read!

Any problems with ZCMD-commands? Simply PM me your topic or check out the tutorial(s) in my signature, more'll come soon!

Twisted_Insane is offline   Reply With Quote
Old 01/04/2012, 09:12 PM   #14
Ash.
High-roller
 
Ash.'s Avatar
 
Join Date: Jan 2010
Location: England
Posts: 2,104
Reputation: 157
Default Re: ZCMD - Commands collection [PART 1]

Quote:
Originally Posted by Twisted_Insane View Post
We're telling the compiler, that he should put the variable "frozen" outta the enum into the info of the player! If you set the value to 1, the compiler knows that the player is frozen now!

Also that wasn't that difficult, the "unfreeze-CMD" is the same, we just have to set the enum's variable to "0" that the compiler knows that the player's unfrozen yet:
You're not telling the compiler anything. The compiler has no idea what this code does, it just knows that it's valid and it will compile it into a valid .amx file that the SA-MP server can run. When doing (var = something) you're merely changing pieces of memory. You're accessing a specific memory address, and changing that data in it. The compiler knows nothing of this.

A #define is used to communicate with the (pre-)compiler. A variable, cannot interact with the (pre-)compiler.

Apart from the small mis-understanding issues on your part, this is good for beginners. I would take a look at a few of your commands though, you have unused variables and needless variables hanging around. You could save a lot of memory in places!
__________________
(AKA funky1234)

TruckingWorld


Think twice before you start programming or you will program twice before you start thinking.
Ash. is offline   Reply With Quote
Old 01/04/2012, 09:34 PM   #15
Twisted_Insane
Gangsta
 
Twisted_Insane's Avatar
 
Join Date: Feb 2012
Posts: 986
Reputation: 94
Default Re: ZCMD - Commands collection [PART 1]

Hey!

Yeah, it was my first tutorial, though. Compared to my current knowledge, at this time I could've been described as 'idiot'!

To the compiler:

You're absolutely right, and actually, I knew this even, since I've learned this 'lesson' while reading about Java programming a time ago! Thanks for the feedback! :P
__________________
Join the BEST Gangwar-server ever; Los Santos Gangwars!
http://forum.sa-mp.com/showthread.ph...42#post2235842
^ Read!

Any problems with ZCMD-commands? Simply PM me your topic or check out the tutorial(s) in my signature, more'll come soon!

Twisted_Insane is offline   Reply With Quote
Old 28/05/2012, 12:35 PM   #16
StrangeLove
Big Clucker
 
StrangeLove's Avatar
 
Join Date: Nov 2011
Location: Philippines
Posts: 178
Reputation: 20
Default Re: ZCMD - Commands collection [PART 1]

How to unban?
__________________
Accomplishments have no color.
StrangeLove is offline   Reply With Quote
Old 07/08/2012, 12:13 AM   #17
gnoomen2
Big Clucker
 
Join Date: Feb 2011
Posts: 194
Reputation: 5
Default Re: ZCMD - Commands collection [PART 1]

Hey, nice tutorial. You seem like a guy that likes to help people. can you tell me the CMD to make a player a a team, just like [frozen] but SS ( for Secret Society) in the /makessleader, but i need it to save when the player exit and login again, please help me with that.
gnoomen2 is offline   Reply With Quote
Old 07/08/2012, 05:53 PM   #18
gnoomen2
Big Clucker
 
Join Date: Feb 2011
Posts: 194
Reputation: 5
Default Re: ZCMD - Commands collection [PART 1]

Never mind i got it working.
gnoomen2 is offline   Reply With Quote
Old 27/08/2012, 11:21 PM   #19
Diogo123
Gangsta
 
Diogo123's Avatar
 
Join Date: Aug 2011
Location: No Mundo de SAO ^^
Posts: 782
Reputation: 38
Default Re: ZCMD - Commands collection [PART 1]

ZCMD - Command Collection [PART 2] - jail, pm, report, acar, fakechat

not taking this link ... I'm doing a system adm so I need a base remade the topic?
__________________

As vezes temos que lutar, mesmo sabendo que vamos perder. (Kurosaki Ichigo)

Sword Art Online Melhor Anime e.e'

By : Zafir


Diogo123 is online now   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
[FilterScript] Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! ) Zh3r0 Filterscripts 113 09/03/2013 05:20 PM
[Tutorial] STRCMP and ZCMD - how to change your commands to ZCMD RockingCamman Tutorials 11 24/10/2011 07:52 PM
[Help] ZCMD commands... Alex_Valde Help Archive 7 23/09/2010 09:06 AM
DCMD Commands not working after adding some ZCMD commands :S [L3th4l] Help Archive 4 20/01/2010 09:57 PM
ZCMD 2 commands rcwarez Help Archive 6 14/12/2009 07:02 PM


All times are GMT. The time now is 02:36 PM.


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