Help with an command
#1

Hey , i need help again .

I need a command when an player go to example: /drift or /sf location , type an message to all players , and other players cand go him , i need this for stunt .

Example: XX Has go to /SFair .

Thanks
Reply
#2

GetPlayerPos
GetPlayerName
Format
strcmp

Search for those at the samps wiki
Reply
#3

Put this on 'OnPlayerCommandText'.
pawn Код:
new playername[MAX_PLAYER_NAME];
pawn Код:
if(strcmp(cmd, "/drift", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SetPlayerPos(playerid, 0.0, 0.0, 0.0);// Set this to the Sf position you want the player to Tp to.
            GetPlayerName(playerid, playername, sizeof(playername));
            format(string, sizeof(string),"%s has teleported to San Fierro.", playername);
            SendClientMessageToAll(0xFFFFFFFF,string);
        }
        return 1;
    }
Reply
#4

Quote:
Originally Posted by Adil
Посмотреть сообщение
Put this on 'OnPlayerCommandText'.
pawn Код:
new playername[MAX_PLAYER_NAME];
pawn Код:
if(strcmp(cmd, "/drift", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SetPlayerPos(playerid, 0.0, 0.0, 0.0);// Set this to the Sf position you want the player to Tp to.
            GetPlayerName(playerid, playername, sizeof(playername));
            format(string, sizeof(string),"%s has teleported to San Fierro.", playername);
            SendClientMessageToAll(0xFFFFFFFF,string);
        }
        return 1;
    }
Thanks , but i need for all comands on my server , not only 1 .
Reply
#5

Quote:
Originally Posted by valentinorossi16
Посмотреть сообщение
Thanks , but i need for all comands on my server , not only 1 .
Then make it your self morron? It isn't that hard, ffs.
Reply
#6

Then you just use those lines the sweet Mr. Adil made for you and put them in your other cmds.
Reply
#7

Ok , ok , i will make these commands , thanks boys .
Reply
#8

Should it be another time. Have fun scripting.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)