RCON Ramp Filterscript - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: RCON Ramp Filterscript (
/showthread.php?tid=78262)
RCON Ramp Filterscript -
Marclang - 18.05.2009
Hi,
Can anyone direct me to an RCON ramp FS,
It would be cool if when logged into rcon, a ramp spawns for like 5 seconds when you click right mouse button, and then despawns after.
Anyone got any links to hand out?
Re: RCON Ramp Filterscript -
miokie - 18.05.2009
Search.
If there not for admin only add to the ramp creating part.
pawn Код:
if(IsPlayerAdmin)
{
//The Ramp creating code here.
}
Re: RCON Ramp Filterscript -
Weirdosport - 18.05.2009
Well I haven't got you a link, but I made you the entire script..
pawn Код:
#include <a_samp>
#define RAMP 1632 //Ramp ID
#define DISTANCE 30.0 //Distance infront
#define TIME 5000 //duration of ramp in ms
new tempkey, ramp;
new Float: X, Float: Y, Float: Z, Float: A;
forward Delete(objectid);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
tempkey = newkeys - oldkeys;
if(tempkey == 4)
{
if(IsPlayerAdmin(playerid))
{
GetXYInFrontOfPlayer(playerid, X, Y, Z, A);
ramp = CreateObject(RAMP, X, Y, Z, 0.0, 0.0, A);
SetTimerEx("Delete", TIME, 0, "d", ramp);
}
}
}
public Delete(objectid)
{
DestroyObject(objectid);
return 1;
}
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, &Float:z, &Float:a)
{
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
if (GetPlayerVehicleID(playerid))
{
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
}
x += (DISTANCE * floatsin(-a, degrees));
y += (DISTANCE * floatcos(-a, degrees));
}
Ordinarily I wouldn't do this, but I thought it was interesting..
Modify DISTANCE, TIME and RAMP to suit you..
P.S you press the "KEY_FIRE" key...
Re: RCON Ramp Filterscript -
Marclang - 18.05.2009
Thank you.
I get a few errors when adding that.
Re: RCON Ramp Filterscript -
Oxside - 18.05.2009
Post the error list here so we can help with fixing the error
Re: RCON Ramp Filterscript -
Weirdosport - 18.05.2009
That's interesting, I compiled the exact script without a single error..