[HELP] Timer
#9

pawn Код:
new bool:Weapon[MAX_PLAYERS];

if(!strcmp(cmdtext, "/smuggleweapon", true))
{
    //Why were you checking if player was connected? LOL
    if(Weapon[playerid] != false) return SendClientMessage(playerid, COLOR_WHITE, "You must wait first!");
    {
        if(gPlayerLogged[playerid] == 0) //This must be '==' not '='
        {
            SendClientMessage(playerid, COLOR_GREY, "   You need to login first !");
        }
        if(HouseEntered[playerid] == 0) //This must be '==' not '='
        {
            SendClientMessage(playerid, COLOR_GREY, "   You can only use /smuggleweapon while you are in your cell !");
        }
        if(HouseEntered[playerid] == 1) //This must be '==' not '='
        {
            GivePlayerWeapon(playerid,4,1);
            ApplyAnimation(playerid,"DEALER","shop_pay",4.1,0,0,0,0,0);
            weapontimer = SetTimer("WeaponTimer", 60000, 1);
            Weapon[playerid] = true;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "   You need to /smoke to use this animation ! ");
        }
    }
    return 1;
}

forward WeaponTimer();
public WeaponTimer()
{
    Weapon[playerid] = false;
    //Your code
}
I suggest you reading some PAWN tutorials..
Reply


Messages In This Thread
[HELP] Timer - by joeri55 - 31.10.2010, 02:43
Re: [HELP] Timer - by joeri55 - 31.10.2010, 11:37
Re: [HELP] Timer - by The_Moddler - 31.10.2010, 11:39
Re: [HELP] Timer - by joeri55 - 31.10.2010, 11:54
Re: [HELP] Timer - by joeri55 - 31.10.2010, 15:34
Re: [HELP] Timer - by willsuckformoney - 31.10.2010, 15:39
Re: [HELP] Timer - by joeri55 - 31.10.2010, 15:46
Re: [HELP] Timer - by joeri55 - 31.10.2010, 15:49
Re: [HELP] Timer - by The_Moddler - 31.10.2010, 15:50
Re: [HELP] Timer - by joeri55 - 31.10.2010, 16:28

Forum Jump:


Users browsing this thread: 1 Guest(s)