[Pedido] Ajuda Aki Salva Vips e Socios
#1

Aew Galera, To Com Um Probleminha Aki, Bom o Problema e Esse Quando Eu Dou Vip ou Socio Para Alguma Pessoa o Meu Vip e Socio Sai, Tipo eu to De Admin,Socio e Vip Ai Eu Do /darvip id level e /darsocio id level, ai beleza o cara ganha o vip e socio mais ai quando eu vo reloga eu perco meu vip e socio e o cara continua com o vip e socio so quando eu uso /darvip e /darsocio pra min e que o cara perde o vip e socio e eu ganho o vip.
Resumindo Parece Que So Uma Pessoa Pode Ser Vip e Socio No Meu Server.

Preciso de Ajuda Com Algum Sistema Que Salve Meus Vips e Socios!!!
Reply
#2

mande o /darsocio e /davip heh
Reply
#3

Pra Q?
Reply
#4

affpraq? Eu emprestei bola e cristal aff
qr ajuda pelomenos manda o comando
Reply
#5

Aew Vo Posta o /darvip

PHP код:
       if(strcmp(cmd"/darvip"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
        
GetPlayerName(playeridsendername256);
         if (
PlayerInfo[playerid][pAdmin] >= 1337)
         {
            
VipVaga();

            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /darvip [id] [Nivel]");
                return 
true;
            }
            new 
para1;
            new 
level;
            
para1 ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /darvip [id] [Nivel]");
                return 
true;
            }
            
level strval(tmp);
            
GetPlayerName(para1giveplayersizeof(giveplayer));
            
GetPlayerName(playeridsendernamesizeof(sendername));
            if(
IsPlayerConnected(para1))
            {
                if(
para1 != INVALID_PLAYER_ID)
                {
                    
format(stringsizeof string"Vocк deu VIP Nнvel %d para %s"levelgiveplayer);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    
format(stringsizeof string"Vocк ganhou VIP Nнvel %d do admin %s"levelsendername);
                    
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                    
getdate(yearmonthday);
                    
gettime(hour,minute,second);
                    
format(stringsizeof(string), "%s deu vip ao %s nнvel %d (%d/%d/%d - %d:%d)",sendername,giveplayer,level,daymonthyear,hourminute);
                    
VipsLog(string);
                    
PlayerInfo[para1][pVIP] = level;
                    new 
var03 0;
                    for(new 
0sizeof(VipInfo); i++)
                    {
                        if(
strcmp(giveplayer,VipInfo[i][vNick],true)==0)
                        {
                            
VipInfo[i][vTipo] = level;
                            
SaveVip();
                            
var03 1;
                            break;
                        }
                    }
                    if(
var03 == 0)
                    {
                        for(new 
0sizeof(VipInfo); i++)
                        {
                            if(
strcmp("Ninguem",VipInfo[i][vNick],true)==0)
                            {
                                
strmid(VipInfo[i][vNick], giveplayer0strlen(giveplayer), 255);
                                
VipInfo[i][vTipo] = level;
                                
SaveVip();
                                break;
                            }
                        }
                    }
                }
            }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return 
true;
    } 
Reply
#6

public LoadVip

public SaveVip

mandаi
Reply
#7

Vo Postar As Duas Porque No Meu GM E Junto
Quote:

Public SaveVip(){new idx;new File: file2;
while (idx < sizeof(VipInfo)){new coordsstring[256];format(coordsstring, sizeof(coordsstring), "%s,%d\n",VipInfo[idx][vNick],VipInfo[idx][vTipo]);
if(idx == 0){file2 = fopen("BrasilGames/Vips.cfg", io_write);}else{file2 = fopen("BrasilGames/Vips.cfg", io_append);}fwrite(file2, coordsstring);idx++;fclose(file2);}return true;}
public LoadVip(){new arrCoords[2][64];new strFromFile2[256];new File: file = fopen("BrasilGames/Vips.cfg", io_read);if (file){new idx = 0;while(idx < sizeof(VipInfo)){fread(file, strFromFile2);split(strFromFile2, arrCoords, ',');
strmid(VipInfo[idx][vNick], arrCoords[0], 0, strlen(arrCoords[0]), 255);VipInfo[idx][vTipo] = strval(arrCoords[1]);idx++;}}fclose(file);return true;}
enum sinfo{sNick[MAX_PLAYER_NAME],sTipo};

Reply
#8

Vo Postar As Duas Porque No Meu GM E Junto

Quote:

Public SaveVip(){new idx;new File: file2;
while (idx < sizeof(VipInfo)){new coordsstring[256];format(coordsstring, sizeof(coordsstring), "%s,%d\n",VipInfo[idx][vNick],VipInfo[idx][vTipo]);
if(idx == 0){file2 = fopen("BrasilGames/Vips.cfg", io_write);}else{file2 = fopen("BrasilGames/Vips.cfg", io_append);}fwrite(file2, coordsstring);idx++;fclose(file2);}return true;}
public LoadVip(){new arrCoords[2][64];new strFromFile2[256];new File: file = fopen("BrasilGames/Vips.cfg", io_read);if (file){new idx = 0;while(idx < sizeof(VipInfo)){fread(file, strFromFile2);split(strFromFile2, arrCoords, ',');
strmid(VipInfo[idx][vNick], arrCoords[0], 0, strlen(arrCoords[0]), 255);VipInfo[idx][vTipo] = strval(arrCoords[1]);idx++;}}fclose(file);return true;}
enum sinfo{sNick[MAX_PLAYER_NAME],sTipo};

Reply
#9

aff deu double
Reply
#10

Identaзгo й luxo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)