Unknown Command problem,please help.
#4

Allright i fixed it. Replace this callback with you'rs in the script.

pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/commands", cmdtext, true) == 0)
    {
         SendClientMessage(playerid, COLOR_YELLOW, "Phonecmds: /sms (number)(message) /call /phonebook /pickup /hangup");
         SendClientMessage(playerid, COLOR_RED, "Resourcecmds: /(carname /weaponspawn(it will freeze you in position,enter cmd again and press enter)");
         SendClientMessage(playerid, COLOR_PINK, "RPcmds: /me /do");
         SendClientMessage(playerid, COLOR_GREEN, "Teleportcmds: /gotolift /gotoraft");
         SendClientMessage(playerid, COLOR_GREEN, "Misc_CMDs: /r /giveobject (Coming Soon) /setsail (1-3) /returnsail ");
         SendClientMessage(playerid, COLOR_GREEN, "Misc_CMDs 2: /sendtohub /sendtoearth /pr0anims ");
         return 1;
    }
    if (strcmp("/setsail", cmdtext, true) == 0)
    {
        new string[50];
        new movetime = MoveObject(ship, -1446.8108, 714.5275, 0.3152, 5.00);
        format(string, sizeof(string), "All Aboard! Destination: SF Dock", movetime);
        SendClientMessage(playerid, 0xFF000000, string);
        return 1;
    }
    if (strcmp("/returnsail", cmdtext, true) == 0)
    {
        new string[50];
        new movetime = MoveObject(ship, -754.2696, 630.3597, 0.1278, 10.00);
        format(string, sizeof(string), "Return Voyage! Destination: Raft Home", movetime);
        SendClientMessage(playerid, 0xFF000000, string);
        return 1;
    }
    if (strcmp("/gotolift", cmdtext, true) == 0)
    {
     SetPlayerPos(playerid,-1090.969482, -1011.279175, 128.153824);
     return 1;
    }
    if (strcmp("/gotoraft", cmdtext, true) == 0)
    {
     SetPlayerPos(playerid,-754.2696, 630.3597, 1.1278);
     return 1;
    }
    if (strcmp("/sendtohub", cmdtext, true) == 0)
    {
     MoveObject(rocket, -1090.969482, -1011.279175, 774.153824, 3);
     SendClientMessage(playerid, 0xDEEE20FF, "Destination: TG Hub");
     return 1;
    }
    if (strcmp("/sendtoearth", cmdtext, true) == 0)
    {
     MoveObject(rocket, -1090.969482, -1011.279175, 128.153824, 5);
     SendClientMessage(playerid, 0xDEEE20FF, "Destination: San Andreas");
     return 1;
    }
    if (strcmp("/setsail2", cmdtext, true) == 0)
    {
        new string[50];
        new movetime = MoveObject(ship, 238.4816, 160.1856, 2.9297, 5.00);
        format(string, sizeof(string), "All Aboard! Destination: Countryside town", movetime);
        SendClientMessage(playerid, 0xFF000000, string);
        return 1;
    }
    if (strcmp("/setsail3", cmdtext, true) == 0)
    {
        new string[50];
        new movetime = MoveObject(ship, 1624.4229, 568.0103, 2.9297, 5.00);
        format(string, sizeof(string), "All Aboard! Destination: LV Dock", movetime);
        SendClientMessage(playerid, 0xFF000000, string);
        return 1;
    }
    if (strcmp("/rules", cmdtext, true) == 0)
    {
         SendClientMessageToAll(0xB8860BAA, "Do not shoot random players/admins.");
         SendClientMessageToAll(0xB8860BAA, "Do not use hacks. Admins only!");
         SendClientMessageToAll(0xB8860BAA, " Do not fight/argue with another player.");
         SendClientMessageToAll(0xB8860BAA, " Do not ram and/or steal.");
         SendClientMessageToAll(0xB8860BAA, "NO BOTS!(unless level 4-5)");
         return 1;
    }
    SendClientMessage(playerid, COLOR_GREY, "Either your not using the command properly, or the command is invalid!");
    return 1;
}
Reply


Messages In This Thread
Unknown Command problem,please help. - by Beastlynoob - 27.04.2012, 03:37
Re: Unknown Command problem,please help. - by Ballu Miaa - 27.04.2012, 03:39
Re: Unknown Command problem,please help. - by Beastlynoob - 27.04.2012, 03:41
Re: Unknown Command problem,please help. - by Ballu Miaa - 27.04.2012, 03:54
Re: Unknown Command problem,please help. - by RollTi - 27.04.2012, 03:54
Re: Unknown Command problem,please help. - by Beastlynoob - 27.04.2012, 04:10
Re: Unknown Command problem,please help. - by Ballu Miaa - 27.04.2012, 04:19
Re: Unknown Command problem,please help. - by Beastlynoob - 27.04.2012, 04:26
Re: Unknown Command problem,please help. - by Mark™ - 27.04.2012, 05:48
Re: Unknown Command problem,please help. - by SuperViper - 27.04.2012, 14:26

Forum Jump:


Users browsing this thread: 1 Guest(s)