earthquake
#1

hey guys i want to make a earthquake but this is not working

Код HTML:
CMD:eq(playerid, params[])
{
    if(GetPVarInt(-1, "EarthQuake") == 1337)
    {
        foreach(Player, i)
        {
            SetPlayerDrunkLevel(i, 49998);
        }
        SetPVarInt(-1, "EarthQuake", 1312);
    }
    else
    if(GetPVarInt(-1, "EarthQuake") == 1312)
    {
        foreach(Player, i)
        {
            SetPlayerDrunkLevel(i, 0);
        }
        SetPVarInt(-1, "EarthQuake", 1337);
    }
    return 1;
}
Reply
#2

Why you use -1 for the playerid?

...so replace that with playerid

PHP код:
CMD:eq(playeridparams[])
{
    if(!
GetPVarInt(playerid"EarthQuake"))
    {
        foreach(
Playeri)
        {
            
SetPlayerDrunkLevel(i49998);
        }
        
SetPVarInt(playerid"EarthQuake"1);
    }
    else
    {
        foreach(
Playeri)
        {
            
SetPlayerDrunkLevel(i0);
        }
        
DeletePVar(playerid"EarthQuake");
    }
    return 
1;

Reply
#3

so if i want to active this for 1 sec?
Reply
#4

The use SetTimerEx. and call a seperate function that has that code in it. Not sure why you would want to do this for 1 second, but hey its your script.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)