#6

Example of teleport Command.

pawn Код:
CMD:goto(playerid,params[])
{
    if(pInfo[playerid][pLogged] == 1)
    {

        if(pInfo[playerid][pAdminLevel] >= 2)
        {
            new targetid;
            if(sscanf(params, "u", targetid)) SendClientMessage(playerid,-1,""chat" /goto [playerid]");
            if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");

            new Float:x,Float:y,Float:z,inter;
            GetPlayerPos(targetid,Float:x,Float:y,Float:z);
            inter = GetPlayerInterior(targetid);
            SetPlayerPosEx(playerid,Float:x,Float:y,Float:z,inter,0);
        }
        else {
            SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
        }
    }
    else if(pInfo[playerid][pLogged] == 0)
    {
        SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u ****"); //replace *** with any word u want xD.
        printf("%s has been kicked for trying to use a command without being logged in!", PlayerName(playerid));
        Kick(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
goto - by UfsDev - 28.03.2014, 19:57
Re: goto - by Salman1700 - 28.03.2014, 20:00
Re: goto - by UfsDev - 28.03.2014, 20:06
Re: goto - by milanosie - 28.03.2014, 20:08
Re: goto - by UfsDev - 28.03.2014, 20:13
Re: goto - by FahadKing07 - 28.03.2014, 20:15
Re: goto - by UfsDev - 28.03.2014, 20:21
Re: goto - by FahadKing07 - 28.03.2014, 20:26

Forum Jump:


Users browsing this thread: 2 Guest(s)