SA-MP Forums Archive
includes - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: includes (/showthread.php?tid=129845)



includes - aircombat - 23.02.2010

1. is there a way to make an include like <cmds> for commands

2. if possible can anyone plz tell me a link for tutorial or explain me how??
________
Rudolf uhlenhaut


Re: includes - Torran - 23.02.2010

I made a topic just like this and yes,

Create a folder called cmds in server directory, Then inside put cmds.txt
Then go on your server, If DCMD Or ZCMD, Put #include "../cmds/cmds.txt" at top of your script,
If cmdtext then put it in OnPlayerCommandText, Try that


Re: includes - aircombat - 23.02.2010

symbol already defined : onplayercommandtext
________
PREGNANT VIDS


Re: includes - Torran - 23.02.2010

Dont include OnPlayerCommandText in cmds.txt


Re: includes - aircombat - 23.02.2010

if i put that in my include :
if(strcmp(cmdtext,"/test", true) == 0)
{
SendClientMessage(playerid,0xAA3333AA,"hello");
return 1;
}

it gives errors : invalid functions or declarations :S
________
Lovely Wendie


Re: includes - Torran - 23.02.2010

Hmm.. Lol delete OnPlayerCommandText from your script, And put it in cmds.txt
And then include it at top of you script


Re: includes - aircombat - 23.02.2010

any other way to put both one in GM and one in include
________
Best cheap vaporizers


Re: includes - Torran - 23.02.2010

Nope as they would conflict