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
#2

ideas
Reply
#3

help
Reply
#4

PHP код:

if(strcmp(cmd"/makedonator"true) == 0) {
        if(
IsPlayerConnected(playerid)) {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /makedonator [Playerid/PartOfName]");
            new 
para1;
            
para1 ReturnUser(tmp);
            if (
PlayerInfo[playerid][pAdmin] >= 1337) {
                if(
IsPlayerConnected(para1)) {
                    if(
para1 != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(para1giveplayersizeof(giveplayer));
                        
PlayerInfo[para1][pDonateRank] = 3;
                        
format(stringsizeof(string), "* made you 3 level VIP"PlayerName(playerid));
                        
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "* you make %s level 3 VIP."giveplayer);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   You are not Admin!");
            }
        }
        return 
1;
    } 
Reply
#5

C:\DOCUME~1Desktop\GANGWA~1.PWN(9810) : error 017: undefined symbol "level"
C:\DOCUME~1Desktop\GANGWA~1.PWN(9812) : error 017: undefined symbol "level"
Reply
#6

#define level or #new level
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)