How to make Player TELE to others Place +REP ?
#3

Quote:
Originally Posted by MAFIAWARS
Посмотреть сообщение
Ofcourse You can co do that.

pawn Код:
CMD:teleplayer(playerid, params[])
{
    new id;
    new PlayerName[24], str_[62];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED1,"[ ! ] USAGE: /teleplayer <playerid> <placename>");
    format(str_, sizeof(str_), "[ ! ] %s has teleported you !", PlayerName);
    SendClientMessage(id, COLOR_RED1, str_);
    SetPlayerPos(id, 1721.9911,-1608.1677,13.5469); //Change X,Y,Z Co-ordinates to what place you want the player to be teleported and type /save
    SetPlayerInterior(id, 0); //Change Interiors....(Check Interiors where you do /save by doing /interior or Search in ******.
// Add more Places here...and name them as you want...
    return 1;
}
If I help you so Please +rep
That'll make every player able to use it, Which he doesn't want...

Okay there are two ways,
1.you can save the Bank's X,Y,Z on the gang and then put it on the script and do it to teleport the player to that position...
2.Or to type the coords on the command ingame, What way would you like ?

If the first one, Then MAFIAWARS's command would be good,
But you'll need to add the stuff to make only admins able to do it, I edit it for you

pawn Код:
CMD:teleplayer(playerid, params[])
{
    if(IsPlayerAdmin(playerid))// Edit this to work with your admin system, If you have one..
    {
        new id;
        new PlayerName[24], str_[62];
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED1,"USAGE: /teleplayer <playerid> <placename>");
        format(str_, sizeof(str_), "%s has teleported you !", PlayerName);
        SendClientMessage(id, COLOR_RED1, str_);
        SetPlayerPos(id, 1721.9911,-1608.1677,13.5469); //Change X,Y,Z Co-ordinates to what place you want the player to be teleported and type /save
        SetPlayerInterior(id, 0); //Change Interiors....(Check Interiors where you do /save by doing /interior or Search in ******.
    }
    return 1;
}
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)