Command With Playerid and Reason
#10

I'm making a /pullover command, and this is what I have..

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

    if(strcmp("/pullover", cmdtext, true, 9) == 0) // "/pullover" is 9 bytes long
    {
        if(strlen(cmdtext[10]) == 0) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /kick [ID] [MSG]");
        //lenght of string at byte 10+, 0 if there is nothing there

        new id = strval(cmdtext[10]);
        //value of the string at byte 10+

        if(IsPlayerConnected(id) == 0) return SendClientMessage(playerid, 0xFF0000AA, "Player not connected");
        //check if the player is connected

        new pos = strfind(cmdtext, " ", true, 10);
        //get the position of the string after the space

        if(pos == -1) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /pullover [ID] [MSG]");
        //pos will be -1 if there is no space

        if(strlen(cmdtext[pos + 1]) == 0) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /pullover [ID] [MSG]");
        //check if there is a string after the space (pos is space, + 1 more byte)

        new string[128];
        format(string, sizeof(string), "ID %d is being asked to pullover for %s", id, cmdtext[pos + 1]);
        SendClientMessageToAll(0xFFFFFFFF, string);
        //format your crap as needed

        Pullover(id);
        //kick player
        return 1;
    }
When I try to compile, I get this error:

C:\Users\Sidhu\Desktop\CopsN'Robbers.pwn(735) : error 017: undefined symbol "Pullover"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Messages In This Thread
Command With Playerid and Reason - by sidhu123 - 01.02.2009, 22:19
Re: Command With Playerid and Reason - by Backwardsman97 - 02.02.2009, 02:03
Re: Command With Playerid and Reason - by AlExAlExAlEx - 02.02.2009, 02:11
Re: Command With Playerid and Reason - by Backwardsman97 - 02.02.2009, 02:19
Re: Command With Playerid and Reason - by LarzI - 02.02.2009, 04:51
Re: Command With Playerid and Reason - by sidhu123 - 02.02.2009, 19:30
Re: Command With Playerid and Reason - by x-cutter - 02.02.2009, 22:25
Re: Command With Playerid and Reason - by Lazarus - 02.02.2009, 22:37
Re: Command With Playerid and Reason - by sidhu123 - 02.02.2009, 23:09
Re: Command With Playerid and Reason - by sidhu123 - 02.02.2009, 23:44
Re: Command With Playerid and Reason - by Auto-Sized - 02.02.2009, 23:56
Re: Command With Playerid and Reason - by Lazarus - 03.02.2009, 00:02
Re: Command With Playerid and Reason - by sidhu123 - 03.02.2009, 00:09
Re: Command With Playerid and Reason - by Backwardsman97 - 03.02.2009, 04:35
Re: Command With Playerid and Reason - by Lazarus - 03.02.2009, 12:30
Re: Command With Playerid and Reason - by LarzI - 03.02.2009, 13:04
Re: Command With Playerid and Reason - by Lazarus - 03.02.2009, 13:12

Forum Jump:


Users browsing this thread: 7 Guest(s)