25.04.2011, 19:51
hello i added this in my map
this is not my code i found it online, i added all of those functions/things above in to my gamemdoe, and the problem is that the bots dont appear
pawn Код:
#include <a_samp>
// ShowGirls 1.1 by O.K.Style™
public OnFilterScriptInit() //i added this ongamemodein
{
ConnectNPC("ShowGirl_1","blank");
ConnectNPC("ShowGirl_2","blank");
ConnectNPC("ShowGirl_3","blank");
ConnectNPC("ShowGirl_4","blank");
return 1;
}
public OnPlayerSpawn(playerid) //i added this onplayerspawn just like it says
{
if(IsPlayerNPC(playerid))
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
if(strcmp(PlayerName, "ShowGirl_1", true) == 0)
{
SetPlayerColor(playerid, 0xF900D300);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, -2673.3816, 1410.4232, 907.5703);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerSkin(playerid, 178);
}
if(!strcmp(PlayerName,"ShowGirl_2",true))
{
SetPlayerColor(playerid,0xF900D3FF);
SetPlayerPos(playerid,-2678.1472,1410.2281,907.5703);
SetPlayerFacingAngle(playerid,270.0);
SetPlayerSkin(playerid,256);
SetPlayerInterior(playerid,3);
}
if(!strcmp(PlayerName,"ShowGirl_3",true))
{
SetPlayerColor(playerid,0xF900D3FF);
SetPlayerPos(playerid,-2678.1472,1414.5895,907.5703);
SetPlayerFacingAngle(playerid,270.0);
SetPlayerSkin(playerid,246);
SetPlayerInterior(playerid,3);
}
if(!strcmp(PlayerName,"ShowGirl_4",true))
{
SetPlayerColor(playerid,0xF900D3FF);
SetPlayerPos(playerid,-2678.1472,1405.8817,907.5703);
SetPlayerFacingAngle(playerid,270.0);
SetPlayerSkin(playerid,244);
SetPlayerInterior(playerid,3);
}
}
return 1;
}
public OnPlayerUpdate(playerid)//added this at the bottom
{
if(IsPlayerNPC(playerid))
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
if(strcmp(PlayerName, "ShowGirl_1", true) == 0
|| strcmp(PlayerName, "ShowGirl_2", true) == 0
|| strcmp(PlayerName, "ShowGirl_3", true) == 0
|| strcmp(PlayerName, "ShowGirl_4", true) == 0)
{
ApplyAnimation(playerid,"STRIP","strip_G",4.1,0,1,1,1,-1,1);
}
}
return 1;
}
public OnFilterScriptExit() //i added this at gamemodeexit
{
for(new i, j = GetMaxPlayers(); i != j; ++i)
{
if(IsPlayerNPC(i))
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(i,PlayerName,sizeof(PlayerName));
if(strcmp(PlayerName, "ShowGirl_1", true) == 0
|| strcmp(PlayerName, "ShowGirl_2", true) == 0
|| strcmp(PlayerName, "ShowGirl_3", true) == 0
|| strcmp(PlayerName, "ShowGirl_4", true) == 0)
{
Kick(i);
}
}
}
return 1;
}