Posts: 20
Threads: 3
Joined: Jan 2015
Reputation:
0
Hi there,
I started scripting again after i was busy with other things for a long time.
I made a gamemode but my cmds don't work at all. It doesn't say that the server doesn't know the command but it's just blank. It doesn't do the command and also doesn't give me any message.
After i've tried multiple things i got mad and deleted the whole gamemode O.o so i have to start all over again.
I also don't know how to get all skins in the playerclass selection ( don't want to put 300 lines in there :P )
I've ******d it till i dropped almost dead but i didn't find anything that works with the gamemode.
Can someone help me with this? What can i do to make the commands work? And is there any code for the playerclass selection?
Oh and also.. Is there any NEW scripting tutorial? I've only found tutorials from yearssss ago, ******* has some new tuts but still there isn't much.
Thanks in advance!
Posts: 381
Threads: 3
Joined: Nov 2015
Reputation:
0
Show us One the command u made.. And What show u tutorial?
There are alot of tutorials about making a command no excuse..
Posts: 20
Threads: 3
Joined: Jan 2015
Reputation:
0
They're all old, isn't it newer nowadays? I remember scripting cmds just the same way i do now, then it worked, now it does nothing.
This is one code i just made 5mins ago, from a yt tut and nope, it doesn't work again -_-
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 5) == 0)
{
SendClientMessage(playerid,indigo,"This is a freeroam server");
return 1;
}
return 0;
}
Posts: 20
Threads: 3
Joined: Jan 2015
Reputation:
0
I was way to long out of this so i have to learn everything step by step again.
That's why i'm following all kinds of tuts for the past 4 days but i just can't get it working tho
Posts: 20
Threads: 3
Joined: Jan 2015
Reputation:
0
Also.. When i add, for example, an register/login filterscript, the cmds also doesn't work!! So i have absolutely no idea what the problem is here
Posts: 1,045
Threads: 150
Joined: Oct 2013
Reputation:
0
I think you are supposed to return a 0 on the commands instead of a 1 while using 'strcmp'. The "newer" way that we use today are includes such as ZCMD, YCMD, etc...
Posts: 20
Threads: 3
Joined: Jan 2015
Reputation:
0
Thanks for your answer. Yesterday i tried scripting the cmd with zcmd and some other plugins that were needed but it still didn't work. I'm getting crazy cause i feel like i've tried everything already.
I'm rn watching a tut from 2010 O.o hopefully this command will work.
The 1 was already in the new script so i just left it there. It's after all these public things so i didn't dare to change it or something :P
Do you think it's better? I'm now scripting a tele cmd while using strcmp and that guy from the vid also uses return 1; ... It's confusing af tho :O wow :P
Posts: 6,242
Threads: 8
Joined: Jun 2008
Use fast commands, and DON'T mix them.
use the wiki, and real tutorials. Videos are cool, but learning to script is more important than following a video step-by-step where you end up in this situation, where it doesn't work, and you can't read the code so you don't know where it's gone to shit.
Also, with your filterscript, does it NEED to be a filterscript? It can after all simply be put in the gamemode itself.
Quote:
Originally Posted by Wex56
Here is example:
Код:
CMD:help(playerid ,params[])
{
SCM(playerid, COLOR_RED, "/car /askq /report /etc /etc /etc");
return 1;
}
|
This is why people say don't post up untested code... SCM is not defined...
Код:
CMD:help(playerid ,params[])
{
SendClientMessage(playerid, COLOR_RED, "/car /askq /report /etc /etc /etc");
return 1;
}
FTFY