SA-MP Forums Archive
server unkown command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: server unkown command (/showthread.php?tid=322830)



server unkown command - thefatshizms - 03.03.2012

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


Re: server unkown command - Seba97 - 03.03.2012

post the command here...


Re: server unkown command - thefatshizms - 03.03.2012

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;
}


Re: server unkown command - thefatshizms - 03.03.2012

does anyone know how to fix?


Re: server unkown command - thefatshizms - 04.03.2012

no one knows how to fix?


Re: server unkown command - thefatshizms - 04.03.2012

got 4 errors


Re: server unkown command - thefatshizms - 04.03.2012

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