Command help need me fast
#1

in my server i have this command
PHP код:
    if(strcmp(cmd"/makedonator"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_WHITE"USAGE: /makedonator [Playerid/PartOfName] [donate rank]");
                return 
1;
            }
            new 
para1;
            new 
level;
            
para1 ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
level strval(tmp);
            if (
PlayerInfo[playerid][pAdmin] >= 1337)
            {
                if(
IsPlayerConnected(para1))
                {
                    if(
para1 != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(para1giveplayersizeof(giveplayer));
                        
PlayerInfo[para1][pDonateRank] = level;
                        
format(stringsizeof(string), "* made you %d level VIP"levelPlayerName(playerid));
                        
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "* you make %s level %d VIP."giveplayer,level);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   You are not Admin!");
            }
        }
        return 
1;
    } 
to make someone donator i need to put him the id of the player and donate level how i can make to pu t only id and automatically to give him 3 level donator
Reply


Messages In This Thread
Command help need me fast - by boyan96 - 23.06.2011, 18:41
Re: Command help need me fast - by boyan96 - 23.06.2011, 18:59
Re: Command help need me fast - by boyan96 - 24.06.2011, 02:54
Re: Command help need me fast - by Ricop522 - 24.06.2011, 03:45
Re: Command help need me fast - by boyan96 - 24.06.2011, 10:18
Re: Command help need me fast - by Skaizo - 24.06.2011, 10:19

Forum Jump:


Users browsing this thread: 1 Guest(s)