How can I do this ?
#1

I want to know if it's possible to make /save and /interior for rcon admins only , on my server. Is this possible ? can you show me how.

Thanks
Reply
#2

What are /save supposed to do? Save player pos (X, Y, Z, A) and Vehicle pos (if you are in a vehicle ofc..)
What are /interior supposed to do? A interior menu so you can teleport to different interiors?
Reply
#3

Quote:
Originally Posted by CyberGhost
Посмотреть сообщение
What are /save supposed to do? Save player pos (X, Y, Z, A) and Vehicle pos (if you are in a vehicle ofc..)
What are /interior supposed to do? A interior menu so you can teleport to different interiors?
I think you misunderstood my question. maybe not but anyway:
/save is a command for anybodys use that will save x,y,z in a file.
and /interior will get the players interior.

I want to know if it's possible to make those commands for rcon access only.
Reply
#4

Quote:
Originally Posted by Funtime
Посмотреть сообщение
I think you misunderstood my question. maybe not but anyway:
/save is a command for anybodys use that will save x,y,z in a file.
and /interior will get the players interior.

I want to know if it's possible to make those commands for rcon access only.
Oh, no you can't disable that so only rcon admins can use it
Reply
#5

I think there's no way to do this, because these are standards commands of SA:MP.
Reply
#6

no you cannot those were built into SA:MP So making a command like /save or /interior would'nt affect it
Reply
#7

If you want to hide the positions and interiors you are using (I guess this is what you want, couldnt think of another reason why you would need to disable these commands) you could try to make cmds /save and /interior in your gamemode that teleport the player away for some ms only and then teleports the player to his old position and interior. Maybe this would cause the client commands to save the position/interior you set, but im absolutely not sure which of them gets executed first, I guess it will work only for people with a low ping.
Reply
#8

If you want ...

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmdtext"/savex"true) == 0)
    {
        
SendClientMessage(playerid0xFFFF00FF"Positions saved.");
        new 
Float:Pos[3];
        
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
        
SetPVarFloat(playerid"X"Pos[0]);
        
SetPVarFloat(playerid"Y"Pos[1]);
        
SetPVarFloat(playerid"Z"Pos[2]);
        
SetPVarInt(playerid"Int"GetPlayerInterior(playerid));
        return 
1;
    }
    if(
strcmp(cmdtext"/go"true) == 0)
    {
        if(
GetPVarType(playerid"X") == 0)
            return 
SendClientMessage(playerid0xFF0000FF"No positions saved.");
        
SendClientMessage(playerid0xFFFF00FF"Teleported.");
        
SetPlayerPos(playeridGetPVarFloat(playerid"X"), GetPVarFloat(playerid"Y"), GetPVarFloat(playerid"Z"));
        
SetPlayerInterior(playeridGetPVarInt(playerid"Interior"));
        return 
1;
    }
    return 
0;

Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)