script Problem
#7

pawn Код:
if(strcmp(cmd, "/Kick", true) == 0)
    {
        new string[128];
        new tmp[256];
        new player[MAX_PLAYER_NAME], kickplayer[MAX_PLAYER_NAME];
        new kickplayerid;
        tmp = strtok(cmdtext, idx);
        kickplayerid = strval(tmp);
       
        if(PlayerInfo[playerid][AdminLevel] == 1)
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, ORANGE, "USAGE: /kick [playerid].");
                SendClientMessage(playerid, ORANGE, "FUNCTION: Kick a player.");
            }
            tmp = strtok(cmdtext, idx);
            GetPlayerName(kickplayerid, kickplayer, sizeof(kickplayer));
            GetPlayerName(playerid, player, sizeof(player));
            printf("Admin %s Has Kicked %s.", player, kickplayer);
            format(string, sizeof(string), "You Have Been Kicked By %s.", player);
            SendClientMessage(kickplayerid, 0x00c2ecff, string);
            format(string, sizeof(string), "You Have Kicked %s.", kickplayer);
            SendClientMessage(playerid, 0x00c2ecff, string);
            Kick(kickplayerid);
            }
            else // <----------- wtf
            {
                format(string, sizeof(string), "%i is not online right now, Sorry.", kickplayerid);
                SendClientMessage(playerid, 0x00c2ecff, string);
            }
    }
    else // <------------ wtf
    {
        SendClientMessage(playerid, 0xE6000FF, "You Are Not A Moderator!");
    }
And to others same.
Reply


Messages In This Thread
script Problem - by Zonoya - 18.09.2011, 19:26
Re: script Problem - by Zonoya - 18.09.2011, 19:34
Re: script Problem - by Zonoya - 19.09.2011, 14:44
Re: script Problem - by Jafet_Macario - 19.09.2011, 15:03
Re: script Problem - by Zonoya - 19.09.2011, 15:07
Re: script Problem - by Kidemo - 19.09.2011, 15:12
Re: script Problem - by Jafet_Macario - 19.09.2011, 15:13
Re: script Problem - by Kingunit - 19.09.2011, 15:14
Re: script Problem - by Zonoya - 19.09.2011, 15:17
Re: script Problem - by Jafet_Macario - 19.09.2011, 15:19

Forum Jump:


Users browsing this thread: 2 Guest(s)