City Hall - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: City Hall (
/showthread.php?tid=353091)
City Hall -
tixzor - 22.06.2012
When you enter the town hall and press F to exit it works ok, but when you go into the hall and then you'll fi shift in the sky
here is command
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
//Gradska Vjecnica-Enter
if( newkeys == KEY_SECONDARY_ATTACK )
{
if( IsPlayerInRangeOfPoint( playerid, 3.0, 1481.0033,-1771.5490,18.7958 ) )
{
SetPlayerPos(playerid, 386.5259, 173.6381, 1008.3828);
SetPlayerInterior(playerid, 3);
GameTextForPlayer( playerid, "Los Santos Vjecnica", 3000, 1 );
return 1;
}
}
//Gradska Vjecnica-Exit
if( newkeys == KEY_SECONDARY_ATTACK )
{
if( IsPlayerInRangeOfPoint( playerid, 3.0, 389.4573,173.6963,1008.3828 ) )
SetPlayerPos( playerid, 1481.0033,-1771.5490,18.7958 );
SetPlayerInterior( playerid, 0);
return 1;
}
//
return 1;
}
Re: City Hall -
[MM]RoXoR[FS] - 22.06.2012
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
//Gradska Vjecnica-Enter
if( newkeys == KEY_SECONDARY_ATTACK )
{
if( IsPlayerInRangeOfPoint( playerid, 3.0, 1481.0033,-1771.5490,18.7958 ) && GetPlayerInterior(playerid)==0)
{
SetPlayerPos(playerid, 386.5259, 173.6381, 1008.3828);
SetPlayerInterior(playerid, 3);
GameTextForPlayer( playerid, "Los Santos Vjecnica", 3000, 1 );
return 1;
}
if( IsPlayerInRangeOfPoint(playerid, 3.0, 389.4573,173.6963,1008.3828) && GetPlayerInterior(playerid)==3)
{
SetPlayerPos( playerid, 1481.0033,-1771.5490,18.7958 );
SetPlayerInterior( playerid, 0);
return 1;
}
}
return 1;
}
Your code had some {} errors.