SERVER: Unknown Command
#1

I have two commands on the top of my OnPlayerCommandText which work perfectly in game, and have no errors, but in-game they do what they are supposed to do but SERVER: Unknown Command comes up.

This is the commands:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(busy[playerid] == 1) return SendClientMessage(playerid,0xAA3333AA,"You cannot use that command here");
    new cmd[256], idx;
    cmd = strtok(cmdtext, idx);
    if(strcmp(cmd, "/dm1", true) == 0)
    {
    new rand = random(sizeof(RandomSpawn));
    new pname[MAX_PLAYER_NAME], string[40 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
    SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
    busy[playerid] = 1;
    format(string, sizeof(string), "** %s has entered a DM arena using /dm1", pname);
    SendClientMessageToAll(0xFF9400FF, string);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 27, 500);
    GivePlayerWeapon(playerid, 24, 500);
    GivePlayerWeapon(playerid, 16, 5);
    }
    if(strcmp(cmd, "/brawl", true) == 0)
    {
    new pname[MAX_PLAYER_NAME], string[40 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    SetPlayerPos(playerid, -179.8903,1883.0837,115.7031);
    busy[playerid] = 1;
    format(string, sizeof(string), "** %s has used /brawl to go into the brawling area", pname);
    SendClientMessageToAll(0xFF9400FF, string);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 5, 1);
    }
Reply


Messages In This Thread
SERVER: Unknown Command - by Garc1a - 30.10.2010, 17:33
Re: SERVER: Unknown Command - by dark_clown - 30.10.2010, 17:38
Re: SERVER: Unknown Command - by <Weponz> - 30.10.2010, 17:41

Forum Jump:


Users browsing this thread: 1 Guest(s)