earthquake - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: earthquake (
/showthread.php?tid=618532)
earthquake -
StR_MaRy - 07.10.2016
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;
}
Re: earthquake -
Kaliber - 07.10.2016
Why you use -1 for the playerid?
...so replace that with playerid
PHP код:
CMD:eq(playerid, params[])
{
if(!GetPVarInt(playerid, "EarthQuake"))
{
foreach(Player, i)
{
SetPlayerDrunkLevel(i, 49998);
}
SetPVarInt(playerid, "EarthQuake", 1);
}
else
{
foreach(Player, i)
{
SetPlayerDrunkLevel(i, 0);
}
DeletePVar(playerid, "EarthQuake");
}
return 1;
}
Re: earthquake -
StR_MaRy - 07.10.2016
so if i want to active this for 1 sec?
Re: earthquake -
azzerking - 07.10.2016
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.