SA-MP Forums Archive
Help with an command - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with an command (/showthread.php?tid=158701)



Help with an command - valentinorossi16 - 10.07.2010

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


Re: Help with an command - Cameltoe - 10.07.2010

GetPlayerPos
GetPlayerName
Format
strcmp

Search for those at the samps wiki


Re: Help with an command - Adil - 10.07.2010

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;
    }



Re: Help with an command - valentinorossi16 - 10.07.2010

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 .


Re: Help with an command - MikkelGutten - 10.07.2010

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.


Re: Help with an command - [DK]JaloNik - 10.07.2010

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


Re: Help with an command - valentinorossi16 - 10.07.2010

Ok , ok , i will make these commands , thanks boys .


Re: Help with an command - [DK]JaloNik - 10.07.2010

Should it be another time. Have fun scripting.