[Ajuda] Nao salva o vip
#1

Eu seto o vip e quando relogo jб nao o tenho, alguem me ajuda?

PHP код:
if(strcmp(cmd,"/darvipo", true)==0)
    {
    new 
aname[MAX_PLAYER_NAME];
    
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    
format(file, sizeof(file), PASTA_CONTAS, aname);
    if(
IsPlayerAdmin(playerid)){
     new 
vvp;
    
tmp = strtok(cmdtext, idx);
    if(!
strlen(tmp)) {
    
SendClientMessage(playerid, Vermelho,"/darvipo [id]");
    return 
1;
    }
    
vvp = strval(tmp);
    if(
IsPlayerConnected(vvp)){
    new 
pname[MAX_PLAYER_NAME];
    
GetPlayerName(vvp, pname, MAX_PLAYER_NAME);
    
format(file, sizeof(file), PASTA_CONTAS, pname);
    
SendClientMessage(playerid, Verde, " | INFO | Comando efetuado com sucesso!");
    
format(string, sizeof(string), " | INFO | O Administrador %s (%d) te setou 30 dias de vip Ouro, aproveite! ", PlayerName(playerid));
    
SendClientMessage(vvp, Azul, string);
    
PlayerInfo[vvp][pVip] = 1;
    
dini_IntSet(file, "VIPOURO", PlayerInfo[vvp][pVip]);
    
dini_IntSet(file, "Combustivel", 700);
    
boat[vvp] = Create3DTextLabel("VIP Prata",Cinza,30.0,40.0,50.0,40.0,1);
    
Attach3DTextLabelToPlayer(boat[vvp],vvp, 0.0, 0.0, 0.5);
    }else{
    
SendClientMessage(playerid, Vermelho, " | ERRO | Jogador nгo conectado!");
    }
    }
    else {
    
SendClientMessage(playerid, Vermelho, " | ERRO | Vocк nгo tem permissгo!");
    }
    return 
1;
    } 
Reply
#2

Esta e a funзгo de dar VIP, vocк tem que criar a de salvar, provavelmente so vai adiciionar para salvar mais uma variavel na funзгo ja existente.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)