/sendto help?
#2

Код:
CMD:sendto(playerid, params[])
{
    new id, id2;
    if(sscanf(params, "uu", id, id2))
    {
        SendClientMessage(playerid, 0xFF0000FF, "USAGE: /sendto [player1] [player2]");
        SendClientMessage(playerid, 0xFF0000FF, "You are going to move [player2] to [player1] position."); 
        return 1;
    }
    else if(!IsPlayerConnected(id) || !IsPlayerConnected(id2) || id == playerid || id2 == playerid) return SendClientMessage(playerid, 0xFF0000FF, "This player is offline or it is yourself");
    else
    {
        new Float:x, Float:y, Float:z, name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
        GetPlayerName(id, name, sizeof(name));
        GetPlayerPos(id, x, y, z);
        SetPlayerPos(id2, x+1, y+1, z);
        format(string, sizeof(string), "You have been moved to %s position.", name);
        SendClientMessage(playerid, 0xFF0000FF, string);
    }
    return 1;
}
Reply


Messages In This Thread
/sendto help? - by Shannkz - 15.10.2012, 18:39
Re: /sendto help? - by RedJohn - 15.10.2012, 18:48
Re: /sendto help? - by gtakillerIV - 15.10.2012, 18:50
Re: /sendto help? - by lorizz - 15.10.2012, 18:50
Re: /sendto help? - by Shannkz - 15.10.2012, 19:05
Re: /sendto help? - by lorizz - 15.10.2012, 19:10

Forum Jump:


Users browsing this thread: 1 Guest(s)