08.07.2012, 15:21
(
Последний раз редактировалось Huxley; 08.07.2012 в 15:46.
Причина: Problem solved.
)
Hello.
When I try to compile my new script, it crashes. I don't know what's the problem because at the end, after I clicked "Cancel" on another window popped saying "Pawn Compiler Library has stopped working". Don't know what's wrong, and here's the code:
Checked:
The availability of AMX and PWN file in filterscripts folder, both of them exist but when I try to load them, the server system window crashes and even when I tried to load in with RCON command while in-game, the same thing happened. So please, someone, help me.
Oh and yes, if you found any mistakes in my script, please fix them. Correcting mistakes is caring.
When I try to compile my new script, it crashes. I don't know what's the problem because at the end, after I clicked "Cancel" on another window popped saying "Pawn Compiler Library has stopped working". Don't know what's wrong, and here's the code:
pawn Код:
// Number Plate Change FIlterscript by [TT]Anonymous
// Any bugs? Please inform me.
#define FILTERSCRIPT
#include <a_samp>
#include <streamer>
#define COLOR_YELLOW 0xFF00FFAA // Yellow
#define COLOR_RED 0xFF0000AA // Red
#define DIALOG_NPCHANGE 99312
#if defined FILTERSCRIPT
new vID = GetPlayerVehicleID(playerid);
new NumbPlateChange;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Number Plate Changer by [TT]Anonymous");
print " Filterscript has been loaded.");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
print(" Filterscript has been unloaded.");
return 1;
}
public OnPlayerSpawn(playerid)
{
NumbPlateChange = CreateDynamicCP(-1928.4941, 276.5805, 41.0469, 4, -1, -1, -1, 100);
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == NumbPlateChange)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You must be in a vehicle.");
else
{
ShowPlayerDialog(playerid, DIALOG_NPCHANGE, DIALOG_STYLE_INPUT, "{FFFFFF}Change your vehicle number plate","{FFFFFF}Please enter your desired text for your vehicle number plate.","Set","Cancel");
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128];
if(dialogid == DIALOG_NPCHANGE)
{
if(response)
{
SetVehicleNumberPlate(vID, inputtext);
format(string,sizeof(string),"Your vehicle number plate has been set to: %s",inputtext);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
else
{
SendClientMessage(playerid, COLOR_RED, "ERROR: You have cancelled.");
}
}
return 1;
}
#endif
The availability of AMX and PWN file in filterscripts folder, both of them exist but when I try to load them, the server system window crashes and even when I tried to load in with RCON command while in-game, the same thing happened. So please, someone, help me.
Oh and yes, if you found any mistakes in my script, please fix them. Correcting mistakes is caring.