Go to any interior command? -
Nuke547 - 23.01.2012
Could you tell me why this command doesnt work? I dont get any errors.
Код:
command(gotointeriorid, playerid, params[])
{
new id, x, y, z;
if(sscanf(params, "mksl", id, x, y, z))
{
if(Player[playerid][AdminLevel] >= 4)
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, id);
SetPlayerPos(playerid, x, y, z);
}
}
}
Re: Go to any interior command? -
Konstantinos - 23.01.2012
What is this "mksl"?
x, y, z, are float and interior id is integer
pawn Код:
CMD:gotointeriorid( playerid, params[ ] )
{
if( Player[ playerid ][ AdminLevel ] < 4)
{
new
id, x, y, z;
if( sscanf( params, "ifff", id, x, y, z ) ) return SendClientMessage( playerid, -1, "Usage: /gotointeriorid <Interior ID> <X> <Y> <Z>" );
SetPlayerVirtualWorld( playerid, 0 );
SetPlayerInterior( playerid, id );
SetPlayerPos( playerid, x, y, z );
}
return 1;
}
Re: Go to any interior command? -
Nuke547 - 23.01.2012
Quote:
Originally Posted by Dwane
What is this "mksl"?
x, y, z, are float and interior id is integer
pawn Код:
CMD:gotointeriorid( playerid, params[ ] ) { if( Player[ playerid ][ AdminLevel ] < 4) { new id, x, y, z;
if( sscanf( params, "ifff", id, x, y, z ) ) return SendClientMessage( playerid, -1, "Usage: /gotointeriorid <Interior ID> <X> <Y> <Z>" ); SetPlayerVirtualWorld( playerid, 0 ); SetPlayerInterior( playerid, id ); SetPlayerPos( playerid, x, y, z ); } return 1; }
|
This kind of worked, everytime I tried going to any interior, it messed up my game and said "Please stay within the world boundaries. Have a fix?
I did:
/gotointeriorid 17 -25.884498 -185.868988 1003.546875
Re: Go to any interior command? -
Nuke547 - 24.01.2012
Bump
Re: Go to any interior command? -
[ABK]Antonio - 24.01.2012
Check your script for
https://sampwiki.blast.hk/wiki/SetPlayerWorldBounds
Re: Go to any interior command? -
Nuke547 - 24.01.2012
Quote:
Originally Posted by [ABK]Antonio
|
That didnt fix the problem. Anything else I could do?
Re: Go to any interior command? -
[ABK]Antonio - 24.01.2012
SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);
in the command before you set their position n stuff, see if that works
Re: Go to any interior command? -
Nuke547 - 24.01.2012
Quote:
Originally Posted by [ABK]Antonio
SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);
in the command before you set their position n stuff, see if that works
|
Nope, didnt work.
Re: Go to any interior command? -
Nuke547 - 24.01.2012
Bump
Re: Go to any interior command? -
Babul - 24.01.2012
Dwanes code, slightly modified:
pawn Код:
CMD:gotointeriorid( playerid, params[ ] )
{
if( Player[ playerid ][ AdminLevel ] < 4)
{
new id, Float:x, Float:y, Float:z;
if( sscanf( params, "ifff", id, x, y, z ) ) return SendClientMessage( playerid, -1, "Usage: /gotointeriorid <Interior ID> <X> <Y> <Z>" );
SetPlayerVirtualWorld( playerid, 0 );
SetPlayerInterior( playerid, id );
SetPlayerPos( playerid, x, y, z );
}
return 1;
}
parsing the "f" specifier with a Float:, does it work now?