Help Infinite nitrous and vehicle godmode - 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: Help Infinite nitrous and vehicle godmode (
/showthread.php?tid=387323)
Help Infinite nitrous and vehicle godmode -
rvald8 - 24.10.2012
PLS Help me how to make a (OnPlayerKeyStateChange) of Unlimited nitrous and a command for a vehicle godmode
Plsss help.
Re: Help Infinite nitrous and vehicle godmode -
BlueGames - 24.10.2012
Any problem with setting it, Feel free contact me here via PM !
Place it somewhere on the top
pawn Код:
public InfNos()
{
new vehicleid;
new nitro;
for(new i=0;i<MAX_PLAYERS;i++)
{
vehicleid=GetPlayerVehicleID(i);
if(IsPlayerConnected(i))
{
if(nitro==1010)
{
if(GetPlayerState(i)==2)
{
AddVehicleComponent(vehicleid,1010);
}
}
}
}
return 0;
}
pawn Код:
OnPlayerKeyStatesChange
{
if(newkeys & KEY_FIRE) // <--------- Fire button, Click then INF NOS will works
{
InfNos(); // <---- INF Nos working
}
}
EDIT:
pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
if(PlayerIsAdmin[playerid] == 1) // <------- Change the PlayerIsAdmin to which function u want
{
RepairVehicle(GetPlayerVehicleID(playerid)); // <-------- Car is repair always, "God Mode"
}
return 1;
}
Re: Help Infinite nitrous and vehicle godmode -
rvald8 - 25.10.2012
C:\Users\gloria\Desktop\Samp 0.3d\gamemodes\Mine.pwn(1090) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
New Text Document.txt
Re: Help Infinite nitrous and vehicle godmode -
-=Dar[K]Lord=- - 25.10.2012
PHP код:
if(newkeys & KEY_FIRE) // SpeedBoost
{
new vehicleid = GetPlayerVehicleID(playerid);
new seat=GetPlayerState(playerid);
if(seat! = PLAYER_STATE_PASSENGER)
{
if(GetVehicleVelocity(vehicleid,vehx,vehy,vehz))
{
AddVehicleComponent(vehicleid,1010);
}
}
}
Put This Under OnPlayerkeystatechange
and... Godmode for rcon admins ...
Put this last of the scrip
PHP код:
forward AutoR(playerid);
public AutoR(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(i))
{
new Float:health, cid;
if (IsPlayerInAnyVehicle(i))
{
cid = GetPlayerVehicleID(i);
GetVehicleHealth(cid, health);
if (health < 1000)
{
RepairVehicle(GetPlayerVehicleID(i));
}
}
}
}
}
return 1;
}
Then OnPlayerUpdate
Put This
PHP код:
if(IsPlayerAdmin(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
SetTimer("AutoR",1000,1);
}
return 1;
}
Re: Help Infinite nitrous and vehicle godmode -
rvald8 - 26.10.2012
Infinite nitrous plsss not speedboost... And if i click LMB or ALT ingame my game freeze when I click T or ` it unfreezes
pls HElp me for this too