Na így muködig de hibát ír:
#include <a_samp>
//színek
#define COLOR_PURPLE 0xC2A2DAAA //bíbor
new npcname[MAX_PLAYER_NAME];
//Jármu vezeto NPC-k
new NPCBus;
new elegy1;
new elegy2;
new verseny1;
new verseny2;
//Gyalogos NPC-k
new tancos1;
new tancos2;
new tancos3;
new tancos4;
new sex1;
new sex2;
public OnFilterScriptInit()
{
NPCBus = CreateVehicle(431, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000);
elegy1 = CreateVehicle(562, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000);
elegy2 = CreateVehicle(562, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000);
verseny1 = CreateVehicle(562, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000);
verseny2 = CreateVehicle(562, 0.0, 0.0, 5.0, 0.0, 0, 0, 5000);
//Jármu vezeto NPC-k
ConnectNPC(\"Busdriver\",\"Bus\");
ConnectNPC(\"elegy1\",\"elegy1\");
ConnectNPC(\"elegy2\",\"elegy2\");
ConnectNPC(\"verseny1\",\"verseny1\");
ConnectNPC(\"verseny2\",\"verseny2\");
//Gyalogos NPC-k
ConnectNPC(\"tancos1\",\"tancos1\");
ConnectNPC(\"tancos2\",\"tancos2\");
ConnectNPC(\"tancos3\",\"tancos3\");
ConnectNPC(\"tancos4\",\"tancos4\");
ConnectNPC(\"sex1\",\"sex1\");
ConnectNPC(\"sex2\",\"sex2\");
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
//Jármu vezeto NPC-k
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, \"Busdriver\", true))
{
PutPlayerInVehicle(playerid, NPCBus, 0);
SetPlayerSkin(playerid, 255);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_PURPLE);
return 1;
}
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, \"elegy1\", true))
{
PutPlayerInVehicle(playerid, elegy1, 0);
SetPlayerSkin(playerid, 83);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_PURPLE);
return 1;
}
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, \"elegy2\", true))
{
PutPlayerInVehicle(playerid, elegy2, 0);
SetPlayerSkin(playerid, 146);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_PURPLE);
return 1;
}
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, \"verseny1\", true))
{
PutPlayerInVehicle(playerid, verseny1, 0);
SetPlayerSkin(playerid, 167);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_PURPLE);
return 1;
}
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, \"verseny2\", true))
{
PutPlayerInVehicle(playerid, verseny2, 0);
SetPlayerSkin(playerid, 233);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_PURPLE);
return 1;
}
//Gyalogos NPC-k
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, \"tancos1\", true))
{
SetPlayerSkin(playerid, 109);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_PURPLE);
return 1;
}
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, \"tancos2\", true))
{
SetPlayerSkin(playerid, 178);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_PURPLE);
return 1;
}
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, \"tancos3\", true))
{
SetPlayerSkin(playerid, 246);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_PURPLE);
return 1;
}
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, \"tancos4\", true))
{
SetPlayerSkin(playerid, 87);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_PURPLE);
return 1;
}
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, \"sex1\", true))
{
SetPlayerSkin(playerid, 185);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_PURPLE);
return 1;
}
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, \"sex2\", true))
{
SetPlayerSkin(playerid, 85);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid,COLOR_PURPLE);
return 1;
}
}
}