is it possible speedboost from /command instead of use a key?
#1

Hello everyone!
I'm trying to make a filterscript speedboost different from that of classic.
I tried to put the boost in the CommandText, running it with a command with /.
This is because I would like to put another pair with a different number.
It seems that the script does not give errors, only that there is a problem.
When I try the server, the server goes, but it hangs at login.
I was not crying there, and I put the factor and the variable at the beginning.
But ... unfortunately, the server keeps crashing at login.
Can you tell me what's wrong or if you can do so?
Or it needs a key?
Please help me! I'd be grateful!
sorry for my dirty english. :]


#include <a_samp>

#define COLOR_DARKRED 0x660000AA

new Float:SpeedBoostMultiplier[MAX_PLAYERS];

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Kb Loaded");
print("--------------------------------------\n");

for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i) && !IsPlayerNPC(i))
{
SpeedBoostMultiplier[i] = 0.5;
}
}
return 1;
}

public OnFilterScriptExit()
{
print("\n----------------------------------");
print(" Kb Unloaded");
print("----------------------------------\n");
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/sckit", cmdtext, true))
{
new Float:vx, Float:vy, Float:vz;
SpeedBoostMultiplier[playerid] = 1.0;
SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * SpeedBoostMultiplier[playerid], vy * SpeedBoostMultiplier[playerid], vz * SpeedBoostMultiplier[playerid]);
SendClientMessage(playerid,COLOR_DARKRED,"You have added the Supercharger on your vehicle.");
return 1;
}
return 0;
}
Reply
#2

Pretty messy, but if you just copy the feeding form the keybind to the command, it will be good i guess. You might need to edit some stuff, but should work. Yes

(By feeding i mean the stuff between { } in the middel, the nucleus of the command.
Reply
#3

I don't see you setting vx, vy and vz to anything..
pawn Код:
GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
EDIT: Try this:
http://pastebin.com/9E7i8tA7
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)