else if ( strcmp( cmd, "gotoloc", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c gotoloc [Name]" );
else
{
new splitx[ 3 ][ 128 ], szMsg[ 128 ];
if ( !IsLocationExist( tmp ) )
{
format( szMsg, sizeof( szMsg ), "Location:[ %s ] does not exist.", tmp );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
return 1;
}
split( dini_Get( "/SavedLocations/Locations.ini", tmp ), splitx, ' ' );
SetPlayerPos( playerid, floatstr( splitx[ 0 ] ), floatstr( splitx[ 1 ] ), floatstr( splitx[ 2 ] ), 0, 0 );
format( szMsg, sizeof( szMsg ), "Teleporting to location:[ %s ]", tmp );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
}
return 1;
}