/get Help!
#2

Why use IsPlayerConnected?
If you can do if(OtherPlayer == INVALID_PLAYER_ID)

pawn Код:
CMD:get(playerid, params[])
{
    new OtherPlayer, Float:x, Float:y, Float:z, PortMsg[128], IntID, WorldID, Name[24];
    if (sscanf(params, "u", OtherPlayer)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/get [id]\"");
    if (OtherPlayer == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "{FF0000}Error: {FFFFFF}That player is not online");
    GetPlayerName(OtherPlayer, Name, sizeof(Name));
    GetPlayerPos(playerid, x, y, z);
    IntID = GetPlayerInterior(playerid);
    WorldID = GetPlayerVirtualWorld(playerid);
    SetPlayerVirtualWorld(OtherPlayer, WorldID);
    SetPlayerInterior(OtherPlayer, IntID);
    SetPlayerPos(OtherPlayer, x, y, z + 3.0);
    format(PortMsg, 128, "|-You teleported %s to your location-|", Name);
    SendClientMessage(playerid, COLOR_RED, PortMsg);
    return 1;
}
Reply


Messages In This Thread
/get Help! - by ShaneOvSina - 14.04.2013, 01:27
Re: /get Help! - by JaKe Elite - 14.04.2013, 05:14

Forum Jump:


Users browsing this thread: 1 Guest(s)