Help with command
#1

I made this command and when i use it , i get a error in the server logs and also it doesnt set the player as vip

PHP код:
CMD:setvip(playeridparams[])
{
    new 
months,str[128],ID;
    if(
IsPlayerAdmin(playerid) || pInfo[playerid][Admin] >= 7)
    {
         if(
sscanf(params,"ui",ID,months)) return SendClientMessage(playerid,0xFFFFFFAA"Usage: /setvip [id] [months 0-12]");
        if(
months 12) return SendClientMessage(playerid,0xFF0000AA,"Error: Maximum months - 12");
        if(
months 0) return SendClientMessage(playerid,0xFF0000AA,"Error: Invalid Month!");
        if(!
IsPlayerConnected(ID))return SendClientMessage(playerid,0xFF0000AA,"Error: Invalid player id!");
        new 
string[128];
        
format(string,sizeof(string),"Error: That person already posses VIP Level 1.");
        if(
pInfo[ID][VIP] == 1) return SendClientMessage(playerid,0xFF0000AA,string);
        {
            if(
months == 1)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (1 Month) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~1 Month VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (1 Month) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*30;
                
SaveChar(ID);
            }
            if(
months == 2)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (2 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~2 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (2 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                  
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*60;
            }
            if(
months == 3)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (3 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~3 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (3 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*90;
            }
            if(
months == 4)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (4 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~4 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (4 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*120;
            }
            if(
months == 5)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (5 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~5 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (5 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*150;
            }
            if(
months == 6)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (6 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~6 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (6 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*180;
            }
            if(
months == 7)
            {
                  
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (7 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~7 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (7 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*210;
            }
            if(
months == 8)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (8 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~8 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (8 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*240;
            }
            if(
months == 9)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (9 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~9 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (9 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*270;
            }
            if(
months == 10)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (10 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~10 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (10 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*300;
            }
            if(
months == 11)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (11 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~11 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (11 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*330;
            }
            if(
months == 12)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (1 Year) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~1 Year VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (1 Year) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*360;
            }
            if(
months == 0)
            {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package 1 (Life Time) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~Unlimited VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package 1 (Life Time) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*1000;
            }
        }
    }
    else return 
ShowMessage(playeriderror1);
    return 
1;

PHP код:
[23:07:08] [debugRun time error 6"Invalid instruction"
[23:07:08] [debug]  Unknown opcode 0x62b90c8 at address 0x00000038
[23:07:08] [debugAMX backtrace:
[
23:07:08] [debug#0 00000038 in public cmd_setvip () at <unknown file>:0
[23:07:08] [debug#1 native CallLocalFunction () from samp-server.exe
[23:07:08] [debug#2 00000aa0 in public OnPlayerCommandText (playerid=0, cmdtext[]=@04615ef8 "/setvip 0  1") at C:\Users\Andre'\Desktop\Andre'\samp\pawno\include\zcmd.inc:106 
Reply
#2

Update your ZCMD files
Reply
#3

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
Update your ZCMD files
im trying to do that but the latest one that i found is 0.3.1 and this is compiled with that version, so if there is a later version could you link it below please
Reply
#4

Post your SaveChar stock.
Reply
#5

Quote:
Originally Posted by Lucases
Посмотреть сообщение
Post your SaveChar stock.
PHP код:
public SaveChar(playerid)
{
    new 
str[60],year,month,day,hour,mins,sec;
    
getdate(yearmonthday);
    
gettime(hour,mins,sec);
    
format(str60,"%d/%d/%d at %d:%d:%d"day,month,year,hour,mins,sec);
    if(
IsPlayerConnected(playerid))
    {
           new 
INI:ACCOUNT INI_Open(UserPath(playerid));
        
INI_SetTag(ACCOUNT,"data");
        
INI_WriteInt(ACCOUNT,"Admin",pInfo[playerid][Admin]);
        
INI_WriteInt(ACCOUNT,"Helper",pInfo[playerid][Helper]);
        
INI_WriteInt(ACCOUNT,"Cash",GetPlayerCash(playerid));
        
INI_WriteInt(ACCOUNT"Bank"pInfo[playerid][Bank]);
        
INI_WriteInt(ACCOUNT,"Kills",pInfo[playerid][Kills]);
        
INI_WriteInt(ACCOUNT,"Deaths",pInfo[playerid][Deaths]);
        
INI_WriteInt(ACCOUNT,"Token",pInfo[playerid][Token]);
        
INI_WriteInt(ACCOUNT"Score",GetPlayerScore(playerid));
        
INI_WriteInt(ACCOUNT"Banned",pInfo[playerid][Banned]);
//        INI_WriteInt(ACCOUNT,"BanHours",pInfo[playerid][BanHours]);
        
INI_WriteInt(ACCOUNT,"BanTime",pInfo[playerid][BanTime]);
        
INI_WriteInt(ACCOUNT,"BanDay",pInfo[playerid][BanDay]);
           
INI_WriteInt(ACCOUNT"VIP",pInfo[playerid][VIP]);
        
INI_WriteInt(ACCOUNT"VIPTIME",pInfo[playerid][VIPTIME]);
        
INI_WriteInt(ACCOUNT"Weplic",pInfo[playerid][Weplic]);
        
INI_WriteInt(ACCOUNT"Plic",pInfo[playerid][Plic]);
        
INI_WriteInt(ACCOUNT"Hours",pInfo[playerid][Hours]);
        
INI_WriteInt(ACCOUNT"Minutes",pInfo[playerid][Minutes]);
        
INI_WriteInt(ACCOUNT"pMuted"pInfo[playerid][pMuted]);
        
INI_WriteInt(ACCOUNT"Jailed",pInfo[playerid][Jailed]);
        
INI_WriteInt(ACCOUNT"JailedTime",pInfo[playerid][JailedTime]);
        
INI_WriteInt(ACCOUNT"House",pInfo[playerid][pHouse]);
        
INI_WriteInt(ACCOUNT"vHouse",pInfo[playerid][pVHouse]);
        
INI_WriteInt(ACCOUNT"Business",pInfo[playerid][pBiz]);
        
INI_WriteInt(ACCOUNT"VBusiness",pInfo[playerid][pVBiz]);
        
INI_WriteInt(ACCOUNT"Perm",pInfo[playerid][perm]);
        
INI_WriteInt(ACCOUNT"Arrested"pInfo[playerid][Arrested]);
        
INI_WriteInt(ACCOUNT"NewChar",pInfo[playerid][New]);
        
INI_WriteInt(ACCOUNT"RefPoints",pInfo[playerid][RefPoints]);
        
INI_WriteInt(ACCOUNT"Gate1"pInfo[playerid][Gate][0]);
        
INI_WriteInt(ACCOUNT"Gate2"pInfo[playerid][Gate][1]);
        
INI_WriteInt(ACCOUNT"Gate3"pInfo[playerid][Gate][2]);
        if(
pInfo[playerid][vModel])
        {
            
GetVehiclePos(pInfo[playerid][pVeh],pInfo[playerid][vX], pInfo[playerid][vY], pInfo[playerid][vZ]);
             
GetVehicleZAngle(pInfo[playerid][pVeh],pInfo[playerid][vA]);
        }
        if(
pInfo[playerid][vBModel])
        {
            
GetVehiclePos(pInfo[playerid][pBVeh],pInfo[playerid][vBX], pInfo[playerid][vBY], pInfo[playerid][vBZ]);
            
GetVehicleZAngle(pInfo[playerid][pBVeh],pInfo[playerid][vBA]);
        }
        if(
pInfo[playerid][vVModel])
        {
            
GetVehiclePos(pInfo[playerid][pVVeh],pInfo[playerid][vVX], pInfo[playerid][vVY], pInfo[playerid][vVZ]);
            
GetVehicleZAngle(pInfo[playerid][pVVeh],pInfo[playerid][vVA]);
        }
        
INI_WriteInt(ACCOUNT"vModel"pInfo[playerid][vModel]);
        
INI_WriteFloat(ACCOUNT"vX"pInfo[playerid][vX]);
        
INI_WriteFloat(ACCOUNT"vY"pInfo[playerid][vY]);
        
INI_WriteFloat(ACCOUNT"vZ"pInfo[playerid][vZ]);
        
INI_WriteFloat(ACCOUNT"vA"pInfo[playerid][vA]);
        
INI_WriteInt(ACCOUNT"vC1"pInfo[playerid][vC1]);
        
INI_WriteInt(ACCOUNT"vC2"pInfo[playerid][vC2]);
        
INI_WriteInt(ACCOUNT"vPJ"pInfo[playerid][vPJ]);
        
INI_WriteInt(ACCOUNT"vLocked"pInfo[playerid][vLocked]);
        
INI_WriteInt(ACCOUNT,"vBModel"pInfo[playerid][vBModel]);
        
INI_WriteFloat(ACCOUNT"vBX"pInfo[playerid][vBX]);
        
INI_WriteFloat(ACCOUNT"vBY"pInfo[playerid][vBY]);
        
INI_WriteFloat(ACCOUNT"vBZ"pInfo[playerid][vBZ]);
        
INI_WriteFloat(ACCOUNT"vBA"pInfo[playerid][vBA]);
        
INI_WriteInt(ACCOUNT"vBC1"pInfo[playerid][vBC1]);
        
INI_WriteInt(ACCOUNT"vBC2"pInfo[playerid][vBC2]);
        
INI_WriteInt(ACCOUNT"vBPJ"pInfo[playerid][vBPJ]);
        
INI_WriteInt(ACCOUNT"vBLocked"pInfo[playerid][vBLocked]);
        
INI_WriteInt(ACCOUNT"vVModel"pInfo[playerid][vVModel]);
        
INI_WriteFloat(ACCOUNT"vVX"pInfo[playerid][vVX]);
        
INI_WriteFloat(ACCOUNT,"vVY"pInfo[playerid][vVY]);
        
INI_WriteFloat(ACCOUNT"vVZ"pInfo[playerid][vVZ]);
        
INI_WriteFloat(ACCOUNT"vVA"pInfo[playerid][vVA]);
        
INI_WriteInt(ACCOUNT"vVC1"pInfo[playerid][vVC1]);
        
INI_WriteInt(ACCOUNT"vVC2"pInfo[playerid][vVC2]);
        
INI_WriteInt(ACCOUNT"vVPJ"pInfo[playerid][vVPJ]);
        
INI_WriteInt(ACCOUNT"vVLocked"pInfo[playerid][vVLocked]);
        
INI_WriteInt(ACCOUNT"Fam"pInfo[playerid][pFam]);
        
INI_WriteInt(ACCOUNT"FamRank"pInfo[playerid][pFamRank]);
         
INI_WriteString(ACCOUNT"LastSeen"str);
          
INI_Close(ACCOUNT);
        new 
string[100];
        
format(string100"%s's character has saved successfully."GetName(playerid));
        print(string);
     }
    return 
1;

Reply
#6

The error is some parenthesis not closed
Reply
#7

Quote:
Originally Posted by Lucases
Посмотреть сообщение
The error is some parenthesis not closed
In otherwords you mean a missing bracket , but where and how will i know when to find the line thats missing it
Reply
#8

if you had unclosed brackets and pharanheses you wouldnt compile it at all. even hits %99 possibility your compiler would crash. ZCMD and OnPlayerCommandText can not be put together.
Reply
#9

Quote:
Originally Posted by grymtn
Посмотреть сообщение
if you had unclosed brackets and pharanheses you wouldnt compile it at all. even hits %99 possibility your compiler would crash. ZCMD and OnPlayerCommandText can not be put together.
i removed the OnPlayerCommandText callback from my GM since i dont use it. The only thing that uses the OnPlayerCommandText callback is the zcmd inc
Reply
#10

maybe instead of update, downgade your zcmd files ? latest zcmd gives me lose of identation(i know it isnt something bad but still i hate warnings) so i downgraded it from another filterscripts pawno includes i can give you too if you want.
Reply
#11

Why don't you simply enable debug level 3? It will tell you the exact line of the problem.

-d3
Reply
#12

Quote:
Originally Posted by grymtn
Посмотреть сообщение
maybe instead of update, downgade your zcmd files ? latest zcmd gives me lose of identation(i know it isnt something bad but still i hate warnings) so i downgraded it from another filterscripts pawno includes i can give you too if you want.
Yes could you please send me it via pm's, i will try it

Quote:
Originally Posted by ThePhenix
Посмотреть сообщение
Why don't you simply enable debug level 3? It will tell you the exact line of the problem.

-d3
I already did the debug mode and its not telling me where the error is it just shows me the error that i paste in the beginning when i made this thread.
Reply
#13

I know you enabled debugging but from what I see you didn't enable debugging level 3.
Reply
#14

Quote:
Originally Posted by ThePhenix
Посмотреть сообщение
I know you enabled debugging but from what I see you didn't enable debugging level 3.
if im not wrong debugging level 3 is when you place "-d3" in a .cfg file in the pawno folder, and i did that.
Reply
#15

Quote:
Originally Posted by 1fret
Посмотреть сообщение
if im not wrong debugging level 3 is when you place "-d3" in a .cfg file in the pawno folder, and i did that.
Did it show you something like this?
Код:
Header size:           5272 bytes
Code size:           380564 bytes
Data size:          5506772 bytes
Stack/heap size:   17039360 bytes; estimated max. usage=2360 cells (9440 bytes)
Total requirements:22931968 bytes
If not, then debugging level 3 was not enabled.
Reply
#16

Quote:
Originally Posted by ThePhenix
Посмотреть сообщение
Did it show you something like this?
Код:
Header size:           5272 bytes
Code size:           380564 bytes
Data size:          5506772 bytes
Stack/heap size:   17039360 bytes; estimated max. usage=2360 cells (9440 bytes)
Total requirements:22931968 bytes
If not, then debugging level 3 was not enabled.
Yes i get that

PHP код:
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
Header size
:          19148 bytes
Code size
:          1171196 bytes
Data size
:         73491800 bytes
Stack
/heap size:      16384 bytesestimated maxusageunknowndue to recursion
Total requirements
:74698528 bytes 
Reply
#17

I guess you're not using the latest version of crashdetect. That's why it says "unknown file".
Reply
#18

Quote:
Originally Posted by ThePhenix
Посмотреть сообщение
I guess you're not using the latest version of crashdetect. That's why it says "unknown file".
the latest version of crashdetect is 4.18.1

Код:
[03:20:05]  Loading plugin: crashdetect.dll
[03:20:05]   CrashDetect v4.18.1 is OK.
[03:20:05]   Loaded.
Reply
#19

Can you try this code? its so much shorter. Remember to replace all COLOR_RED's
Код:
CMD:setvip(playerid,params[])
{
	if(pInfo[playerid][Admin]<7) return SendClientMessage(playerid,COLOR_RED,"You are not allowed to do this command");
	new id,months;
	if(sscanf(params,"ud",id,months)) return SendClientMessage(playerid,COLOR_RED,"Usage: /setvip [playerid] [months]");
	if(months>12) return SendClientMessage(playerid,COLOR_RED,"Months can not be greater than 12");
	if(months<1) return SendClientMessage(playerid,COLOR_RED,"Months can not be 0 or less than 0");
	if(id==INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"That player is not online");
	if(pInfo[id][VIP]==1) return SendClientMessage(playerid,COLOR_RED,"This player is already VIP!");
	new str[128];
	format(str,sizeof(str),"You have recieved VIP for %d months.",months);
	SendClientMessage(id,COLOR_RED,str);
	format(str,sizeof(str),"Enjoy ~g~%d Month VIP!",months);
	GameTextForPlayer(id,str,3000,5);
	SendClientMessage(id,COLOR_RED,"Type /vcmds for the list of VIP commands.");
	format(str,sizeof(str),"You have given %s a VIP package for %d months subscription.",GetName(id),months);
	SendClientMessage(playerid,COLOR_RED,str);
	pInfo[id][VIP]=1;
	pInfo[id][VIPTIME] = gettime()+60*60*24*30*months;
	return 1;
}
EDIT: tested as a gamemode and works totally perfect on my pc.
Reply
#20

Tested on my server working perfect give a try
PHP код:
CMD:setvip(playeridparams[])
{
         new 
months,str[128],ID;
         if(!
IsPlayerAdmin(playerid) || pInfo[playerid][Admin] < 7) return ShowMessage(playeriderror1);
         if(
sscanf(params,"ui",ID,months)) return SendClientMessage(playerid,0xFFFFFFAA"Usage: /setvip [id] [months 0-12]");
         if(
months 12) return SendClientMessage(playerid,0xFF0000AA,"Error: Maximum months - 12");
         if(
months 0) return SendClientMessage(playerid,0xFF0000AA,"Error: Invalid Month!");
         if(!
IsPlayerConnected(ID))return SendClientMessage(playerid,0xFF0000AA,"Error: Invalid player id!");
         if(
pInfo[ID][VIP] == 1) return SendClientMessage(playerid,0xFF0000AA"Error: That person already posses VIP Level 1");
         if(
months == 1)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (1 Month) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~1 Month VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (1 Month) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*30;
                
SaveChar(ID);
         }
         if(
months == 2)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (2 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~2 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (2 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                  
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*60;
         }
         if(
months == 3)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (3 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~3 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (3 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*90;
         }
         if(
months == 4)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (4 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~4 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (4 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*120;
         }
         if(
months == 5)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (5 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~5 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (5 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*150;
         }
         if(
months == 6)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (6 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~6 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (6 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*180;
         }
         if(
months == 7)
         {
                  
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (7 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~7 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (7 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*210;
         }
         if(
months == 8)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (8 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~8 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (8 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*240;
         }
         if(
months == 9)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (9 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~9 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (9 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*270;
         }
         if(
months == 10)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (10 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~10 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (10 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*300;
         }
         if(
months == 11)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (11 Months) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~11 Months VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (11 Months) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*330;
         }
         if(
months == 12)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package (1 Year) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~1 Year VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package (1 Year) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*360;
         }
         if(
months == 0)
         {
                
SendClientMessage(ID,0xFFFF00AA,"You have recieved VIP Package 1 (Life Time) Subscribtion.");
                
GameTextForPlayer(ID"Enjoy ~g~Unlimited VIP!"30005);
                
SendClientMessage(ID,0xFFFFFFAA,"Type /vcmds for the list of VIP commands.");
                
format(strsizeof(str),"You've given %s a VIP Package 1 (Life Time) subscription",GetName(ID));
                
SendClientMessage(playerid,0xFFFFFFAA,str);
                
pInfo[ID][VIP] = 1;
                
pInfo[ID][VIPTIME] = gettime()+60*60*24*1000;
         }
           return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)