17.02.2014, 13:20
i made a command dcmd_showweapons and when i join the game and type the command it says unknown cmd....
here this is what i used to do this command..
after that i did this at oneplayercommandtext..
And under onplayercommandtext i have put the command
here this is what i used to do this command..
pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(showweapons,11,cmdtext);
return 0;
}
pawn Код:
dcmd_showweapons(playerid,params[])
{
new string[128];
if(sscanf(params, "u", ID))
etccccccc............