[GameMode] Drift Server (unlimited nos + car hp) - 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: Gamemode Scripts (
https://sampforum.blast.hk/forumdisplay.php?fid=71)
+--- Thread: [GameMode] Drift Server (unlimited nos + car hp) (
/showthread.php?tid=504545)
Drift Server (unlimited nos + car hp) -
Dignity - 04.04.2014
Not really alot of work but I've been getting plenty of requests from friends without alot of scripting knowledge to have the script and since it's only like 50 lines I guess I don't really mind giving it out. It has player and vehicle godmode and also unlimited nos (applied when holding mouse button). A Elegy can be spawned using /car. It should probably be filed as a filterscript but whatever.
Credits:
SA-MP wiki and
Basicz
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define HOLDING(%0) \
((newkeys & (%0)) == (%0))
#define RELEASED(%0) \
(((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
main ();
public OnPlayerSpawn( playerid )
{
new
randskin = 1 + random ( 298 ); // random skin
SetPlayerPos ( playerid, 1679.1, -1752.7, 13.5 );
SetPlayerSkin ( playerid, randskin );
return 1;
}
public OnPlayerUpdate( playerid )
{
new Float: health;
if ( IsPlayerInAnyVehicle ( playerid ) )
RepairVehicle ( GetPlayerVehicleID (playerid ) );
if( GetPlayerHealth ( playerid, health ) < 100 )
SetPlayerHealth ( playerid, 100.0 );
return 1;
}
public OnPlayerKeyStateChange ( playerid, newkeys, oldkeys )
{
if ( HOLDING( KEY_FIRE ) && GetPlayerState ( playerid ) == PLAYER_STATE_DRIVER )
AddVehicleComponent ( GetPlayerVehicleID ( playerid ), 1010 );
if ( RELEASED( KEY_FIRE ) && GetPlayerState ( playerid ) == PLAYER_STATE_DRIVER )
RemoveVehicleComponent ( GetPlayerVehicleID ( playerid ), 1010 );
return 1;
}
CMD:car ( playerid, params[] )
{
new
Float:x, Float:y, Float:z, Float:a, spawnedcar;
GetPlayerPos ( playerid, x, y, z ), GetPlayerFacingAngle( playerid, a );
spawnedcar = CreateVehicle ( 562, x, y, z, a, -1, -1, -1 );
PutPlayerInVehicle ( playerid, spawnedcar, 0 ) ;
SendClientMessage ( playerid, -1, "Spawned an Elegy at your location!" );
return 1;
}
Re: Drift Server (unlimited nos + car hp) -
micha654 - 04.04.2014
Nice
__________________
+REP If I helped you
Re: Drift Server (unlimited nos + car hp) -
amirab - 05.04.2014
it's not a really gamemode !
you could post it in Filterscripts section
but any way good one

!
Re: Drift Server (unlimited nos + car hp) -
Warmonger1984 - 05.04.2014
Nice =)
Re: Drift Server (unlimited nos + car hp) -
ReD_HunTeR - 05.04.2014
that must be filterscript?, BTW Nice
Re: Drift Server (unlimited nos + car hp) -
CombatFire - 05.04.2014
like they says here its can be an FS but thanks anyway, good work.