[Tutorial] How to create commands with ZCMD & sscanf
#21

Amazing tut. Thank you. Taught me a lot.
Reply
#22

Great tutorial, best i've seen so far! But my only question is, where did you find the function, I mean do we have to search for the function!? It would take ages.
Reply
#23

Quote:
Originally Posted by Vinninho
View Post
Great tutorial, best i've seen so far! But my only question is, where did you find the function, I mean do we have to search for the function!? It would take ages.
Which function are you talking about
Reply
#24

1 of the best tutorials , thanks man!
Reply
#25

Код:
G:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(707) : error 029: invalid expression, assumed zero
G:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(707) : error 017: undefined symbol "cmd_givemoney"
G:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(707) : error 029: invalid expression, assumed zero
G:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(707) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
How to fix it
Reply
#26

And i have that problem!!!!!!!!
Reply
#27

Quote:
Originally Posted by Bug.
Посмотреть сообщение
Код:
G:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(707) : error 029: invalid expression, assumed zero
G:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(707) : error 017: undefined symbol "cmd_givemoney"
G:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(707) : error 029: invalid expression, assumed zero
G:\CokeTDM [0.3e]\gamemodes\NpTDM.pwn(707) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
How to fix it
Display that line of your code (707)
Reply
#28

Well if i include < sscanf2 > the server gamemode doens't load, it says "error 19 Couldn't find xxxx.amx any idea of why that happens?

on topic: I got it, very good explained thank you.
Reply
#29

This is The Best Tut Ever!!!! Good Job Bro
+Rep
Reply
#30

Good tutorial! Good for beginners to learn sscanf and zcmd.
Reply
#31

By the way, i find out some warning, You see in line of

GetPlayerName(playerid, sendernamename, sizeof(sendername));

in "Sendernamename" i got warning cause these already another "name" in it

So only you need 1 "Sendername" not 2 name

I'm just a new scripter and i just found out
Reply
#32

Guys, ive define the script but it still didnt work. Ive did below steps as well, but there is still error message
Код:
E:\Rockstar Games\GTA San Andreas\samp03x_svr_R1-2_win32_3\gamemodes\warishere.pwn(6) : fatal error 100: cannot read from file: "sscanf"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
please help
Reply
#33

Nice one bro.

Youre very expert in explaining
Your tutorial Veryyy helped me alot to make more advanced commands using zcmd
Reply
#34

someone make this command for me please /givemoney amount please to send cash to every one ..
Reply
#35

Thank you Jafet for you tutorial, this helped me a lot. +REP
Reply
#36

Great tutorial. Well explained and noob friendly. +rep
Reply
#37

pawn Code:
CMD:YourCMD(playerid, arg[])
Will also work!
Reply
#38

Very Nice Tutorial
Thanks In Advance
Reply
#39

Quote:
Originally Posted by d0nTtoucH
View Post
someone make this command for me please /givemoney amount please to send cash to every one ..
Code:
CMD:setallmoney(playerid, params[])
{
	new pname[64], money;
	if (sscanf(params, "d", money)) return SendClientMessage2(playerid, COLOR_WHITE, "Usage: /setallmoney [amount]");
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		GetPlayerName(i,pname,sizeof(pname));
		if(IsPlayerConnected(i))
		{
			PlayerPlaySound(i,1057,0.0,0.0,0.0);
			GivePlayerMoney(i, money);
			dini_IntSet(AddDirFile(dir_userfiles, pname), "cash", GetPlayerMoney(playerid));
		}
	}
	new strings[128];
	format(strings,sizeof(strings),"An Admin has given $%d money to all connected players.",money);
	SendClientMessageToAll(COLOR_BLUE, strings);
	return 1;
}
I Hope This Work

i Just Created here not tested yet
Reply
#40

Suppose I have a command /pmspy. But now, I want to create /pspy.

So if I do something like this:

Code:
for (new i=0; i<MAX_PLAYERS; i++)
{
    if(playerData[i][playerLevel] >= 4)
    {
        if(playerData[i][pspy])
            {
                 new spyText[200];
		 format(spyText, sizeof(spyText), "{3E7EFF}[Police Radio Spy]: {FFFFFF}%s", message);
		 SendClientMessage(i, COLOR_WHITE, spyText);
	     }
     }
}
I'm going to have to initialize pspy somewhere otherwise pawno says
Code:
undefined symbol: "pspy"
My question is: where do I initialize it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)