SA-MP Forums Archive
Help me - 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)
+--- Thread: Help me (/showthread.php?tid=528992)



Help me - Cr3dO - 30.07.2014

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;




Re: Help me - Sharpadox - 30.07.2014

Whats the Problem?