server unkown command
#1

ok i made i cmd and theres no error while compiling it but when i go in game and do /rob (thats the cmd) it says server unkown command
Reply
#2

post the command here...
Reply
#3

do you mean the code? if so here it is:

#include <a_samp>

#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" just some commmands :P");
print("--------------------------------------\n");
return 1;
}

forward OnPlayerCommandText(playerid, cmdtext[]);
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(rob, 3, cmdtext);
return 0;
}
dcmd_rob(playerid, params[])
{
new id;
if (strlen(params))
{
id=strlen(params);
if (IsPlayerConnected(id))
{
GivePlayerMoney(id, 100);
SetPlayerScore(id, 5);
SendClientMessage(playerid, 0x00FF00AA, "you have sucessfully robed someone! score+5");
SendClientMessage(playerid, 0x00FF00AA, "player robbed");
}
else
{
SendClientMessage(playerid, 0x00FF00AA, "player not found !");
}

}
else
{
SendClientMessage(playerid, 0x00FF00AA, "usage:/rob [id]");

}
return 1;
}

public OnFilterScriptExit()
{
return 1;
}
Reply
#4

does anyone know how to fix?
Reply
#5

no one knows how to fix?
Reply
#6

got 4 errors
Reply
#7

bump theres got to be someone that know how to fix ma problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)