Admin command: /gethere [id] - ZCMD
#10

Quote:
Originally Posted by MrBorsh
Посмотреть сообщение
Could you add a comment( // ) on each of the lines. What the following does, et cetra?
pawn Код:
CMD:gethere(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return 0; //Stops the function from continuing if they aren't an admin.
    new target; //a variable to store our target in
    if(sscanf(params, "r", target)) return SendClientMessage(playerid, 0xCC0000AA, "USAGE: /gethere [player]"); //Checks if inside of the parameters string is a players ID or name
    new Float:tPos[3]; //we will store our players position in this array
    GetPlayerPos(playerid, tPos[0], tPos[1], tPos[2]); //here we grab the players position and store it in the array we previously created
    SetPlayerPos(target, tPos[0], tPos[1], tPos[2]); //we set the targets postion to the players position
    return 1;
}
Reply


Messages In This Thread
Admin command: /gethere [id] - ZCMD - by MrBorsh - 07.07.2012, 19:04
Re: Admin command: /gethere [id] - ZCMD - by reh_007 - 07.07.2012, 19:06
Re: Admin command: /gethere [id] - ZCMD - by SnG.Scot_MisCuDI - 07.07.2012, 19:07
Re: Admin command: /gethere [id] - ZCMD - by MrBorsh - 07.07.2012, 19:08
Re: Admin command: /gethere [id] - ZCMD - by SnG.Scot_MisCuDI - 07.07.2012, 19:11
Re: Admin command: /gethere [id] - ZCMD - by shayan122 - 07.07.2012, 19:15
Re: Admin command: /gethere [id] - ZCMD - by MrBorsh - 07.07.2012, 19:20
Re: Admin command: /gethere [id] - ZCMD - by SnG.Scot_MisCuDI - 07.07.2012, 19:21
Re: Admin command: /gethere [id] - ZCMD - by shayan122 - 07.07.2012, 19:26
Re: Admin command: /gethere [id] - ZCMD - by [ABK]Antonio - 07.07.2012, 19:29

Forum Jump:


Users browsing this thread: 1 Guest(s)