16.03.2011, 21:56
Look at the folllowing script, can you please tell me whats wrong? It doesn't work when I upload it on my server
pawn Код:
#include <a_samp>
#if defined FILTERSCRIPT
// Pickups
new iBluEnterprises
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" My Family HQ");
print("--------------------------------------\n");
DisableInteriorEnterExits(1);
iBluEnterprises = CreatePickup(1239, 23, 1154.9916,-1181.0249,32.8187);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText
dcmd(oprison, 7, cmdtext);
if(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:shax, Float:shay, Float:shaz;
new Float:shbx, Float:shby, Float:shbz;
new Float:shcx, Float:shcy, Float:shcz;
//foreach(Player, i)
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1154.9916,-1181.0249,32.8187))
{
SetPlayerPos(playerid, 2145.3311,1597.4742,1003.9677);
SetPlayerInterior(playerid,1);
SetPlayerVirtualWorld(playerid,999);
GameTextForPlayer(playerid, "~w~ Blu Enterprises™", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.5, 2157.3936,1596.0560,999.9688)) //John's Office
{
SetPlayerPos(playerid, 1226.6959,-813.4658,1084.0078);
SetPlayerInterior(playerid, 5);
GameTextForPlayer(playerid,"~w~ John_Blu's Office", 3000, 1);
}
}
return 1;
}
if(strcmp(cmd, "/exit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2145.3311,1597.4742,1003.9677))
{
SetPlayerPos(playerid, 1154.9916,-1181.0249,32.8187);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerFacingAngle(playerid, 270.0);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.5, 1226.6959,-813.4658,1084.0078)) //John's Office
{
SetPlayerPos(playerid, 2157.3936,1596.0560,999.9688);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else{ return 1; }
}
}
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == iBluEnterprises)
{
GameTextForPlayer(playerid, "~w~Type ~r~/enter~w~ to go inside", 5000, 5);
return 1;
}
return 1;
}
#endif