#include
#1

i have been told that it is possable to include pwn files (not filterscripts) but like store the cmds in a pwn file then include it under onplayerconnect how would this be done

thanks

ps: need this to make my gm smaller
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext)
{
   dcmd(kill,4,cmdtext);

return 0;
}
Now normally you'd write the command here... Below OnPlayerCommandText li

dcmd_kill(playerid, params[])
{
#pragma unused params
SetPlayerHealth(playerid, 0);
return 1;
}

instead, write the commands in another file, save it as pwn file. So it could be plcmds.pwn

So now it would look like this..

pawn Код:
public OnPlayerCommandText(playerid, cmdtext)
{
   dcmd(kill,4,cmdtext);

return 0;
}

#include "gmfiles/plcmds.pwn"
That #include like assumes you create a folder with the plcmds.pwn file inside. its easier i find to do it that way, rather than clutter up the gamemode folder.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)