heyho leute;
ich habe ein problem, undzwar werden die NPC's nicht in ihre autos geportet:
#pragma tabsize 0
#include <a_samp>
new CARBOTCAR;
new CARBOTCAR1;
//-------------------------------------------------
public OnFilterScriptInit()
{
ConnectNPC("RailRoad","train");
ConnectNPC("ChiliadFlight","chiliadflight");
return 1;
}
public OnGameModeInit()
{
CARBOTCAR = AddStaticVehicle(538, 2864.7500, 1330.8091, 12.1256, 0.0009,1,1); //RailRoad halt
CARBOTCAR1 = AddStaticVehicle(487,-2345.9314,-1636.8939,483.8792,268.5638,0,1); // CARBOTCAR1 chiliad flight
AddStaticVehicle(431, -1993.6313, 148.9479, 27.6402, 359.8514,0,1); //bus in sf
return 1;
}
public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid)) {
new ip_addr_npc[64+1];
new ip_addr_server[64+1];
GetServerVarAsString("bind",ip_addr_server,64);
GetPlayerIp(playerid,ip_addr_npc,64);
if(!strlen(ip_addr_server)) {
ip_addr_server = "127.0.0.1";
}
if(strcmp(ip_addr_npc,ip_addr_server,true) != 0) {
printf("NPC: Got a remote NPC connecting from %s and I'm kicking it.",ip_addr_npc);
Kick(playerid);
return 0;
}
printf("NPC: Connection from %s is allowed.",ip_addr_npc);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(!IsPlayerNPC(playerid)) return 1;
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"RailRoad",true))
{
PutPlayerInVehicle(playerid,CARBOTCAR,0);
SetPlayerColor(playerid,0xFFFFFF00);
SetPlayerSkin(playerid, 61);
}
if(!IsPlayerNPC(playerid)) return 1;
new pname[64];
GetPlayerName(playerid,pname,64);
if(!strcmp(pname,"ChiliadFlight",true))
{
PutPlayerInVehicle(playerid,CARBOTCAR1,0);
SetPlayerColor(playerid,0xFFFFFF00);
SetPlayerSkin(playerid, 61);
}
return 1;
}
ich sehe gerade nicht den fehler....
mfg xXganzereuroXx
//edit: hab den fehler gefunden, es geht wieder.
---closed