SA-MP Forums Archive
Command help need me fast - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command help need me fast (/showthread.php?tid=263853)



Command help need me fast - boyan96 - 23.06.2011

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


Re: Command help need me fast - boyan96 - 23.06.2011

ideas


Re: Command help need me fast - boyan96 - 24.06.2011

help


Re: Command help need me fast - Ricop522 - 24.06.2011

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;
    } 



Re: Command help need me fast - boyan96 - 24.06.2011

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


Re: Command help need me fast - Skaizo - 24.06.2011

#define level or #new level