Sscanf ID 0 Issue
#3

Its not the command is i though i explained.

pawn Код:
Here are some Commands.

CMD:goto(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] >=5)
    {
        new id,Float:X,Float:Y,Float:Z,pName[MAX_PLAYER_NAME],string[126],iName[MAX_PLAYER_NAME],string2[126];
        if (unformat(params, "u",id))SendClientMessage(playerid,COLOR_RED,"Usage: /Goto [ID]");
        if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
        else
        {
            new vWorld = GetPlayerVirtualWorld(id);
            SetPlayerVirtualWorld(playerid,vWorld);
            new Interior = GetPlayerInterior(id);
            SetPlayerInterior(playerid,Interior);
            GetPlayerPos(id,X,Y,Z);
            SetPlayerPos(playerid,X,Y,Z);
            GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
            format(string,128,"Admin %s has teleported to you",pName);
            SendClientMessage(id,COLOR_ORANGE,string);
            GetPlayerName(id, iName, MAX_PLAYER_NAME);
            format(string2,128,"You have gone to %s",iName);
            SendClientMessage(id,COLOR_ORANGE,string2);
        }
    }
    return 1;
}


CMD:gethere(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] >=5)
    {
        new id,Float:X,Float:Y,Float:Z,pName[MAX_PLAYER_NAME],string[126],iName[MAX_PLAYER_NAME],string2[126];
        if (unformat(params, "u",id))SendClientMessage(playerid,COLOR_RED,"Usage: /Gethere [ID]");
        if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
        else
        {
            new vWorld = GetPlayerVirtualWorld(playerid);
            SetPlayerVirtualWorld(id,vWorld);
            new Interior = GetPlayerInterior(playerid);
            SetPlayerInterior(id,Interior);
            GetPlayerPos(playerid,X,Y,Z);
            SetPlayerPos(id,X,Y,Z);
            GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
            format(string,128,"Admin %s has teleported you",pName);
            SendClientMessage(id,COLOR_ORANGE,string);
            GetPlayerName(id, iName, MAX_PLAYER_NAME);
            format(string2,128,"You have Gotten to %s",iName);
            SendClientMessage(id,COLOR_ORANGE,string2);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Sscanf ID 0 Issue - by Shockey HD - 20.12.2011, 03:36
Re: Sscanf ID 0 Issue - by JamesC - 20.12.2011, 03:41
Re: Sscanf ID 0 Issue - by Shockey HD - 20.12.2011, 03:48
Re: Sscanf ID 0 Issue - by JamesC - 20.12.2011, 03:54
Re: Sscanf ID 0 Issue - by Tee - 20.12.2011, 04:57
Re: Sscanf ID 0 Issue - by Shockey HD - 21.12.2011, 03:56
Re: Sscanf ID 0 Issue - by Tee - 21.12.2011, 04:08

Forum Jump:


Users browsing this thread: 1 Guest(s)