Help[rep]
#1

i tried to make a CMD like this /levelup

ad when i type the whole server gets an level up!please help i tried and then i deleted it by mistake!
Reply
#2

pawn Код:
//Put this under /levelup command
for(new i=0; i < MAX_PLAYERS; i++)
{
      //level up function, example:
      LevelUp(i); //this will level up all players in server, which are "marked" with "i"
}
Reply
#3

i made this please fix it

Код:
 //-------------------------------[LevelUp]--------------------------------------------------------------------------
				if (strcmp(cmd, "/levelupall", true) == 0)
				{
				    if(IsPlayerConnected(playerid))
				    {
                        if(PlayerInfo[playerid][pAdmin] >= 1337)
					    {
						    if (gPlayerLogged[playerid] != 0)
						    {
                            for(new i=0; i < MAX_PLAYERS; i++)
						    {
      						//level up function, example:
      						LevelUp(i); //this will level up all players in server, which are "marked" with "i"
						}
Reply
#4

pawn Код:
if(strcmp(cmd, "/levelupall", true) == 0)
{
     if(IsPlayerConnected(playerid))
     {
           if(PlayerInfo[playerid][pAdmin] >= 1337)
           {
               if(gPlayerLogged[playerid] == 1)
               {
                      for(new i=0; i < MAX_PLAYERS; i++)
                       {
                            //level up function
                       }
               }
           }
     }
     return 1;
}
Reply
#5

By levelup means their Admin Level?
If yes, then use it as fiki posted above.
pawn Код:
if(strcmp(cmd, "/levelupall", true) == 0)
{
     if(IsPlayerConnected(playerid))
     {
           if(PlayerInfo[playerid][pAdmin] >= 1337)
           {
               if(gPlayerLogged[playerid] == 1)
               {
                      for(new i=0; i < MAX_PLAYERS; i++)
                       {
                            PlayerInfo[i][pAdmin] ++;
                       }
               }
           }
     }
     return 1;
}
Reply
#6

pawn Код:
if (strcmp(cmd, "/levelupall", true) == 0)
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        if (gPlayerLogged[playerid] != 0)
        {
            for(new g_Players = 0; g_Players < MAX_PLAYERS; g_Players++)
            {
                //Your level up function, if you're using Godfather, which I'm assuming you are:
                PlayerInfo[g_Players][pLevel]++;
        }
        else return 0; //Not logged in.
    }
    else return 0; //Not authorized to use this.
    return 1;
}
Reply
#7

how come i get no level up?
Reply
#8

Quote:
Originally Posted by fiki574_CRO
Посмотреть сообщение
pawn Код:
//Put this under /levelup command
for(new i=0; i < MAX_PLAYERS; i++)
{
     //level up function, example:
     (36671) LevelUp(i); //this will level up all players in server, which are "marked" with "i"
}

(36671) : error 017: undefined symbol "LevelUp"
Reply
#9

Код:
 if (strcmp(cmd, "/lvlup", true) == 0)
				{
     			    if(IsPlayerConnected(playerid))
     				{
           			    if(PlayerInfo[playerid][pAdmin] >= 1337)
           				{
               			if(gPlayerLogged[playerid] == 1)
               			{
                      	for(new i=0; i < MAX_PLAYERS; i++)
                       	{
                            PlayerInfo[i][pAdmin] ++;
                       	}
               		 }
           		   }
			    }
    			return 1;
				}
i want to appear a message in sendclientmessage Thank you for staying on our server!+ i get no level up!
Reply
#10

Quote:
Originally Posted by Dan_Barocu
Посмотреть сообщение
Код:
 if (strcmp(cmd, "/lvlup", true) == 0)
				{
     			    if(IsPlayerConnected(playerid))
     				{
           			    if(PlayerInfo[playerid][pAdmin] >= 1337)
           				{
               			if(gPlayerLogged[playerid] == 1)
               			{
                      	for(new i=0; i < MAX_PLAYERS; i++)
                       	{
                            PlayerInfo[i][pAdmin] ++;
                       	}
               		 }
           		   }
			    }
    			return 1;
				}
i want to appear a message in sendclientmessage Thank you for staying on our server!+ i get no level up!
Did u read my post above

Go to SAMP Wiki and/or look for tutorials here on forums!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)