Help me
#1

PHP код:
if(strcmp(cmd"/buyws"true) == 0)
{
        new 
stringa[256]; // String.
        
if(IsPlayerConnected(playerid) == 1// Checks if player is connected.
        
{
            new 
points[248]; // Points.
            
new nxtlevel PlayerInfo[playerid][pWS]+1// As soon as its executed, It adds +1 to your score.
            
new expamount nxtlevel*3// Exp amount, Its 2 CURRENTLY but you can raise it by adding +number after levelex
             
if(PlayerInfo[playerid][pWS] == 10)
            }
            else
            {
             
format(points,sizeof(points)," Трябват ти %d XP, а в момента имаш %d!"expamountPlayerInfo[playerid][Exp]); // Format, This is pretty obvious.
                
SendClientMessage(playerid,COLOR_GRAD1,points); // Sends the message
            
}
             if(
PlayerInfo[playerid][Exp] < expamount// Checks if player's exp amount is above the required one or not.
            
{
                
format(points,sizeof(points)," Трябват ти %d XP, а в момента имаш %d!"expamountPlayerInfo[playerid][Exp]); // Format, This is pretty obvious.
                
SendClientMessage(playerid,COLOR_GRAD1,points); // Sends the message
                
return 1;
            }
            else
            {
                
PlayerInfo[playerid][Exp] -= expamount//  Sets the EXP amount to 0 as you level'd up.
                
PlayerInfo[playerid][pWS]++; // Adds a level.
                
format(stringa,sizeof(stringa),"Честито!Ти вдигна твоя Weapon skill на %d!"PlayerInfo[playerid][pWS]); // Format.
                
SendClientMessage(playerid,COLOR_ORANGE,stringa); // Sends the message.
                
return 1;
            }
        }
        return 
1;

Reply
#2

Whats the Problem?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)