boost to be default situation - 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: boost to be default situation (
/showthread.php?tid=424755)
boost to be default situation -
HurtLocker - 23.03.2013
I have this little fs for vehicle speed boost and no matter what I changed, didnt make the boost to be default.
pawn Код:
#include <a_samp>
new bool: EnableBoost[MAX_PLAYERS];
public OnFilterScriptInit()
{
print(" Loaded successful.");
return 1;
}
public OnPlayerConnect(playerid)
{
EnableBoost[playerid] = true;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/Boost", true)==0)
{
if(EnableBoost[playerid]==true)
{
EnableBoost[playerid] = false;
SendClientMessage(playerid, 0x924161FF, "[ ! ] Boost Deactivated.");
}
else
{
EnableBoost[playerid] = true;
SendClientMessage(playerid, 0x924161FF, "[ ! ] Boost Activated.");
}
return 1;
}
return 0;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (IsPlayerInAnyVehicle(playerid) || GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(newkeys & KEY_FIRE)
{
if(EnableBoost[playerid] == true)
{
new Float:vx,Float:vy,Float:vz;
GetVehicleVelocity(GetPlayerVehicleID(playerid),vx,vy,vz);
SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * 1.3, vy *1.3, vz * 1.3);
}
}
}
return 0;
}
Re: boost to be default situation -
HurtLocker - 23.03.2013
Some help here. What I mean is that when I enter my server, the boost isnt applied. I need to type boost to enabe it. What I want is the boost to be already applied as soon as I enter my server.
EDIT: nevermind, somehow fixed even if I didn't change anything