System 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: System earthquake (
/showthread.php?tid=493456)
System earthquake -
DnL - 08.02.2014
Want to create an earthquake. The effect of the earthquake I want to give the level of drunk. I mean when the screen moves. How can I give a speed that effect?
Re: System earthquake -
CuervO - 08.02.2014
You can't speed it more than it is already. Real earthquakes effects are only induced by explosions and high speed trains moving nearby.
You could script a camera shake with the camera functions though, but it would be a pretty advanced script (Also a great idea)
Re: System earthquake -
DnL - 08.02.2014
Could you give me the command that can do this? Or advise what to use?
Re: System earthquake -
CuervO - 08.02.2014
https://sampwiki.blast.hk/wiki/GetPlayerCameraFrontVector
https://sampwiki.blast.hk/wiki/SetPlayerCameraLookAt
I will try scripting this, it seems like a fun thing to do.
Re: System earthquake -
Pottus - 08.02.2014
Quote:
Originally Posted by CuervO
You can't speed it more than it is already. Real earthquakes effects are only induced by explosions and high speed trains moving nearby.
You could script a camera shake with the camera functions though, but it would be a pretty advanced script (Also a great idea)
|
I have not tried it myself but you could possibly use the first person shooting method but offset the attachment.
https://sampforum.blast.hk/showthread.php?tid=333330
Re: System earthquake -
erminpr0 - 08.02.2014
pawn Код:
YCMD:eq(playerid, params[], help)
{
#pragma unused help
#pragma unused params
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.
Re : Re: System earthquake -
Kilou - 08.02.2014
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;
}
Re: System earthquake -
DnL - 09.02.2014
Thanx for help all ! Topic Close Please !
Re: System earthquake -
TheFirst - 18.05.2014
Someone have earthquakes system? please give me ..