NEED HELP ASAP -
Hitman-97- - 16.03.2011
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
Re: NEED HELP ASAP -
hadzx - 16.03.2011
made it easyer to read
Код:
#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);
//dcmd(ouninvite, 9, cmdtext);
dcmd(unban, 5, cmdtext);
dcmd(banaccount, 10, cmdtext);
dcmd(setaccent, 9, cmdtext);
dcmd(deleteaccount, 13, cmdtext);
dcmd(duel, 4, cmdtext);
if(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Floathax, Floathay, Floathaz;
new Floathbx, Floathby, Floathbz;
new Floathcx, Floathcy, Floathcz;
//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.968) //John's Office
{
SetPlayerPos(playerid, 1226.6959,-813.4658,1084.007;
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.007) //John's Office
{
SetPlayerPos(playerid, 2157.3936,1596.0560,999.968;
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
Re: NEED HELP ASAP -
admantis - 16.03.2011
First you need to say what's not working.
Second you forgot to add a semicolon after 'iBluEnterprises'
And you are looping and using 'playerid' instead of the defined varaiable 'i'.
Are you mind handicapped to not notice this?
Re: NEED HELP ASAP -
Mauzen - 16.03.2011
+ this line is incomplete and you are missing the bracket block after it:
public OnPlayerCommandText
Did you read through it just a single short time before crying here for HELP ASAP?
You also have to compile it btw, or your server cant do anything with it...
Re: NEED HELP ASAP -
Hitman-97- - 17.03.2011
I already compiled it, it didn't show any error
Re: NEED HELP ASAP -
Mauzen - 17.03.2011
Oh right, because of this:
Add at the very top of your script:
Or the whole part will be left out of the script, because FILTERSCRIPT is not defined.
Then fix the other errors mentioned here and it should work.