[Ajuda] SetTimerEx - string como argumento
#1

Olб meus queridos, fiz um delay de comandos aqui da seguinte forma:
comando:
pawn Код:
CMD:consertar(playerid, params[])
{
    if(GetPVarInt(playerid, "CMDconsertar") == 1)
        return SendClientMessage(playerid, COLOR_RED, "[ x ] Vocк ainda nгo pode usar este comando.");
    //SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid, -1, "[>>>] Veнculo consertado!");

    SetPVarInt(playerid, "CMDconsertar", 1);
    printf("Nome var: CMDconsertar, Valor: %i", GetPVarInt(playerid, "CMDconsertar"));
    SetTimerEx("DelayComandos", 30000, false, "ds", playerid, "CMDconsertar");

    return 1;
}
funзгo:
pawn Код:
forward DelayComandos(playerid, nomevar[]);
public DelayComandos(playerid, nomevar[])
{
    printf("Entrou funcao");
    printf("Valor %s: %i", nomevar, GetPVarInt(playerid, nomevar));
    DeletePVar(playerid, nomevar);
    printf("Deletou %s, valor: %i", nomevar, GetPVarInt(playerid, nomevar));
    new str[64];
    format(str, sizeof str, "[>>>] Vocк jб pode usar o comando %s novamente.", nomevar);
    SendClientMessage(playerid, -1, str);
           
    return 1;
}
O que acontece й que quando entra na funзгo DelayComandos, o GetPVarInt(playerid, "CMDconsertar") tem valor 0.
como mostra a imagem

Alguem sabe o que estб acontecendo ?
Reply


Messages In This Thread
SetTimerEx - string como argumento - by retsaoremo - 14.02.2013, 12:48
Re: SetTimerEx - string como argumento - by Maklister - 14.02.2013, 12:55
Re: SetTimerEx - string como argumento - by DouglasRodrigues - 14.02.2013, 13:11
Re: SetTimerEx - string como argumento - by retsaoremo - 14.02.2013, 16:36
Re: SetTimerEx - string como argumento - by retsaoremo - 14.02.2013, 16:47
Re: SetTimerEx - string como argumento - by retsaoremo - 14.02.2013, 17:12
Re: SetTimerEx - string como argumento - by leonardo1434 - 14.02.2013, 17:29
Re: SetTimerEx - string como argumento - by retsaoremo - 15.02.2013, 14:38
Re: SetTimerEx - string como argumento - by leonardo1434 - 15.02.2013, 14:50
Re: SetTimerEx - string como argumento - by retsaoremo - 15.02.2013, 14:55

Forum Jump:


Users browsing this thread: 1 Guest(s)