[HELP] Timer
#1

Hello,

I need some help with making a timer for something.

I'm making that people can /houseupgrade 3 (that means they can get a weapon).

Now I want to make a timer so people can use /smuggleweapon and need to wait for 30 minutes to get a weapon. This can only be possible in their house. I only got this:


Код:
forward WeaponTimer();
Код:
new weapontimer;
Код:
public WeaponTimer()
{

}
and this killtimer:

Код:
    KillTimer(weapontimer);
And
Код:
weapontimer = SetTimer("WeaponTimer", 60000, 1);
Now I want to make a /getweapon that people can only use in their house and when they got the houseupgrade. And I don't have a clue how to make it, I'm using the LA-RP script aka Godfather.

I hope someone can help me..

And this is the code that I need to take 30 minutes before you get the gun.

Код:
         if(!strcmp(cmdtext, "/smuggleweapon", true))
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "   You need to login first !");
                return 1;
            }
            if (HouseEntered[playerid] = 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "   You can only use /smuggleweapon while you are in your cell !");
                return 1;
            }
            if (HouseEntered[playerid] = 1)
            {
                GivePlayerWeapon(playerid,4,1);
                ApplyAnimation(playerid,"DEALER","shop_pay",4.1,0,0,0,0,0);
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   You need to /smoke to use this animation ! ");
                return 1;
            }
        }
        return 1;
     }
It also gives this error:
C:\Users\mma\Desktop\San Andreas Server\gamemodes\prpr.pwn(17227) : warning 211: possibly unintended assignment
C:\Users\mma\Desktop\San Andreas Server\gamemodes\prpr.pwn(17232) : warning 211: possibly unintended assignment
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)