11.10.2010, 01:25
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;
}
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;
}