Hallo,
ich wollte ein teleport in ein filterscript reinpacken
pawno meckert nicht, jedoch beim test funktioniert er nicht...
kann mir da jemand helfen?
das is das filterscript
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define COLOR_GREEN 0x33AA33AA
#pragma tabsize 0
enum pInfo
{
pKey[128],
pLevel,
pAdmin,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
new Float:TelePos[MAX_PLAYERS][6];
public OnFilterScriptInit()
{
CreateObject(1325, 924.724,-911.519, 70.3703, 0, 270, 86);
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/aufzug", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1336)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 911.678,-922.719,70.3703);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 911.678,-922.719,70.3703);
}
SendClientMessage(playerid, COLOR_GREEN, "Thanks for traveling with Deutsche Bahn!");
}
}
return 1;
}
return 0;
}