06.06.2012, 12:30
hello guys one of my filterscripts seems to not work as there are no errors but.. the cmds dont work ingame :/
here is my code:
here is my code:
pawn Code:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" ***************************************");
print(" * Filterscript by thefatshizms *");
print(" ***************************************");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
CMD:givecar(playerid,params[])
{
new carid;
new id;
new Float:X, Float:Y, Float:Z, Float:angle;
if(sscanf(params,"du",carid, id)) return SendClientMessage(playerid,-1,"Error: - /givecar [car id] [player id]");
GetPlayerPos(id, X, Y, Z);
GetPlayerFacingAngle(id, angle);
CreateVehicle(carid, X, Y, Z, angle, 0, 1, 60);
PutPlayerInVehicle(id, carid, 0);
return 1;
}
CMD:goto(playerid, params[])
{
new id;
new Float:X, Float:Y, Float:Z;
if(sscanf(params,"u",id)) return SendClientMessage(playerid, -1, "USAGE: /goto [id]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "this player isnt connected!");
GetPlayerPos(id, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z);
return 1;
}
#endif