/givevip isn't working
#1

Hey there, i have problem with this fckin /givevip code


Here is the code:

PHP код:
            if(!strcmp(data"givevip"true7)) if(strlen(data) > 10) if(GetNumberOfParams(data) == 3)
            {
                
printf("SERVER FILE CMD '%s' ACCEPTED"data);
                new 
name[32];
                
format(name32"%s"GetStringPart(data1' '));
                
DeleteSmallChars(name);
                new 
givetime strval(GetStringPart(data2' '));
                new 
way[64];
                
format(way64"walkingdead/%s.pi"name);
                if(!
fexist(way))
                {
                    
printf("FILE '%s' DOESN'T EXISTS"way);
                }
                else
                {
                    new 
playerid = -1;
                    for(new 
i=MAX_ZOMBIES+MAX_AIRPORT_ZOMBIESi<=MaxConnectedIDi++) if(IsPlayerConnected(i)) if(Player[i][Logged] == true) if(!strcmp(PlayerName(i), nametrue))
                    {
                        
playerid i;
                        break;
                    }
                    if(
playerid == -1)
                    {
                        new 
filetime lvini_Read(way08);
                        if(
filetime gettimeex()) filetime gettimeex();
                        
lvini_Write(way08filetime givetime);
                        
                        new 
filexp lvini_Read(way02);
                        if(
givetime >= 2592000lvini_Write(way02filexp 2000);
                        else 
lvini_Write(way02filexp 1000);
                        
                        
printf("GIVEVIP (UNCONNECTED) '%s', '%s', '%d'."namewaygivetime);
                    }
                    else
                    {
                        new 
filetime lvini_Read(way08);
                        if(
filetime gettimeex()) filetime gettimeex();
                        
lvini_Write(way08filetime givetime);
                        new 
string[80];
                        
format(string80"[ SMS ] You have activated your VIP %s and added 1000 XP."timestamp(filetime givetime));
                        
SendClientMessage(playerid0xFF0000FFstring);
                        
                        
Player[playerid][VIP] = true;
                        if(
givetime >= 2592000GivePlayerXP(playerid2000);
                        else 
GivePlayerXP(playerid1000);
                        
SetPlayerColor(playerid0xFFCC00FF);
                        
UpdatePlayerSkillsInfo(playerid);
                        
printf("GIVEVIP (CONNECTED) '%s', '%s', '%d'."namewaygivetime);
                    }
                }
            }
        }
    } 
I hope you can help me!
Reply
#2

We can't help you if you don't say what's wrong. We're not just gonna search the whole code and discover the error.
Give us the error messages, or tell us what its doing instead of what it should do. And what does /givevip do?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)