System earthquake
#7

Quote:
Originally Posted by erminpr0
Посмотреть сообщение
pawn Код:
YCMD:eq(playerid, params[], help)
{
    if(GetPVarInt(-1, "EarthQuake") == 1337)
    {
        foreach(Player, i)
        {
            SetPlayerDrunkLevel(i, 49998);
        }
        print("EarthQuake off");
        SetPVarInt(-1, "EarthQuake", 1312);
    }
    else
    if(GetPVarInt(-1, "EarthQuake") == 1312)
    {
        foreach(Player, i)
        {
            SetPlayerDrunkLevel(i, 0);
        }
        print("EarthQuake off");
        SetPVarInt(-1, "EarthQuake", 1337);
    }
    return 1;
}
Missunderstood, sorry.
If you don't use params, use strcmp, not YCMD or ZCMD.
pawn Код:
if(strcmp("/eq", cmdtext, true)==0)
{
    if(GetPVarInt(-1, "EarthQuake") == 1337)
    {
        foreach(Player, i)
        {
            SetPlayerDrunkLevel(i, 49998);
        }
        print("EarthQuake off");
        SetPVarInt(-1, "EarthQuake", 1312);
    }
    else
    if(GetPVarInt(-1, "EarthQuake") == 1312)
    {
        foreach(Player, i)
        {
            SetPlayerDrunkLevel(i, 0);
        }
        print("EarthQuake off");
        SetPVarInt(-1, "EarthQuake", 1337);
    }
    return 1;
}
Reply


Messages In This Thread
System earthquake - by DnL - 08.02.2014, 16:25
Re: System earthquake - by CuervO - 08.02.2014, 16:43
Re: System earthquake - by DnL - 08.02.2014, 16:45
Re: System earthquake - by CuervO - 08.02.2014, 16:50
Re: System earthquake - by Pottus - 08.02.2014, 16:57
Re: System earthquake - by erminpr0 - 08.02.2014, 16:57
Re : Re: System earthquake - by Kilou - 08.02.2014, 17:10
Re: System earthquake - by DnL - 09.02.2014, 15:20
Re: System earthquake - by TheFirst - 18.05.2014, 17:36

Forum Jump:


Users browsing this thread: 1 Guest(s)