#1

~~~~~~
Reply
#2

pawn Код:
CMD:goto(playerid, params[])
{
    new pID;
    if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /goto (Nick/ID) - Enter A Valid Nick / ID");
    if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This Player Is Not Connected.");
    if(isDead[pID] == 1) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command On A Dead Player.");
    if(isDead[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command When Dead.");
    if(pID == playerid) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command On Yourself.");
    if(Duty[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command On An Admin On Duty."); // added this one PS shouldn't it be 0?
    GetPlayerPos(playerid, GotoX[playerid], GotoY[playerid], GotoZ[playerid]);
    GotoInterior[playerid] = GetPlayerInterior(playerid);
    GotoVWorld[playerid] = GetPlayerVirtualWorld(playerid);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(pID, x, y, z);
    if(IsPlayerInAnyVehicle(pID)) SetPlayerPos(playerid, x, y, z+1.6);
    else
    {
        switch(random(3))
        {
            case 0: SetPlayerPos(playerid, x + 1.5, y, z);
            case 1: SetPlayerPos(playerid, x, y + 1.5, z);
            case 2: SetPlayerPos(playerid, x+0.7, y+0.7, z+1);
        }
    }
    SetPlayerInterior(playerid, GetPlayerInterior(pID));
    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pID));
    return 1;
}
Reply
#3

^^^^^^^^
Reply
#4

pawn Код:
CMD:goto(playerid, params[])
{
    new pID;
    if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /goto (Nick/ID) - Enter A Valid Nick / ID");
    if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This Player Is Not Connected.");
    if(isDead[pID] == 1) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command On A Dead Player.");
    if(isDead[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command When Dead.");
    if(pID == playerid) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command On Yourself.");
    if(IsInAdminArea[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "This Player Is In Admin Area, You Cannot /goto Him."); //Try this
    if(Duty[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command On An Admin On Duty."); // dunno about this, cant test because the reason above
    GetPlayerPos(playerid, GotoX[playerid], GotoY[playerid], GotoZ[playerid]);
    GotoInterior[playerid] = GetPlayerInterior(playerid);
    GotoVWorld[playerid] = GetPlayerVirtualWorld(playerid);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(pID, x, y, z);
    if(IsPlayerInAnyVehicle(pID)) SetPlayerPos(playerid, x, y, z+1.6);
    else
    {
        switch(random(3))
        {
            case 0: SetPlayerPos(playerid, x + 1.5, y, z);
            case 1: SetPlayerPos(playerid, x, y + 1.5, z);
            case 2: SetPlayerPos(playerid, x+0.7, y+0.7, z+1);
        }
    }
    SetPlayerInterior(playerid, GetPlayerInterior(pID));
    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(pID));
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)