Tag Mischat on somefhing it shouldent
#3

Here is my Command:

pawn Код:
CMD:seteventinfo(playerid, params [ ] )
{
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerAdmin(playerid))
        {
            if(IsThereActiveEvent == 0)
            {
                new string[128];
               
                if(!sscanf(params, "s[128]", string))
                {
                    new message[40];
                    if(strcmp(string,"Health",true)==0)
                    {
                        new Float:health;
                        if(!sscanf(params, "f", health))
                        {
                            if(health < 1 || health > 100) { SendClientMessage(playerid, COLOR_GREY, "Dont go below 1 or 100 for health"); return 1; }
                            EventHP = health;
                            format(message, sizeof(message), "You have set the Health for event to %f", health);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, message);
                        }
                        else
                            SendClientMessage(playerid, COLOR_GREY, "USAGE: /seteventinfo [health] [amounth]");
                       
                    }
                    else if(strcmp(string,"Armor",true)==0)
                    {
                        new Float:armor;
                        if(!sscanf(params, "f", armor))
                        {
                            if(armor < 1 || armor > 100) { SendClientMessage(playerid, COLOR_GREY, "Dont go below 1 or 100 for armor"); return 1; }
                            EventArmor = armor;
                            format(message, sizeof(message), "You have set the Armor for event to %f", armor);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, message);
                        }
                        else
                            SendClientMessage(playerid, COLOR_GREY, "USAGE: /seteventinfo [armor] [amounth]");
                    }
               
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "USAGE: /seteventinfo [name]");
                    SendClientMessage(playerid, COLOR_GREY, "Avaible names: Health, Armor, Gun1, Gun2, Gun3, Gun4, Gun5");
                }
            }
            else
                SendClientMessage(playerid, COLOR_GREY, "An Event is already active use /endevent to finish it");
        }
        else
            SendClientMessage(playerid, COLOR_GREY, "You must be Logged in as RCON to use this Command");
    }
    return 1;
}
Reply


Messages In This Thread
Tag Mischat on somefhing it shouldent - by Jason_Thunde - 14.10.2011, 19:03
Re: Tag Mischat on somefhing it shouldent - by Jochemd - 14.10.2011, 19:06
Re: Tag Mischat on somefhing it shouldent - by Jason_Thunde - 14.10.2011, 19:07
Re: Tag Mischat on somefhing it shouldent - by Wesley221 - 14.10.2011, 19:08
Re: Tag Mischat on somefhing it shouldent - by SchurmanCQC - 14.10.2011, 19:08
Re: Tag Mischat on somefhing it shouldent - by Jochemd - 14.10.2011, 19:09
Re: Tag Mischat on somefhing it shouldent - by wups - 14.10.2011, 19:10
Re: Tag Mischat on somefhing it shouldent - by SchurmanCQC - 14.10.2011, 19:11
Re: Tag Mischat on somefhing it shouldent - by Jason_Thunde - 14.10.2011, 19:14

Forum Jump:


Users browsing this thread: 2 Guest(s)