[Filterscript] Need /goto toogle
#7

pawn Код:
dcmd_goto(playerid,params[]) {
    if(!strlen(params)) return SendClientMessage(playerid,red,"{FF0000}Use{FFFFFF}: /Goto [PlayerID]");
    new player1, string[128];
    if(!IsNumeric(params)) player1 = ReturnPlayerID(params);
    else player1 = strval(params);
    if(gotost[player1] == 0 && PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid, red, "Error: you can't teleport to this player right now.");
    if(!IsPlayerConnected(player1) || player1 == INVALID_PLAYER_ID || player1 == playerid) return SendClientMessage(playerid, red, "Player is either not connected or is you.");
    CMDMessageToAdmins(playerid,"GOTO");
    new Float:x, Float:y, Float:z;  GetPlayerPos(player1,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(player1));
    SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(player1));
    if(GetPlayerState(playerid) == 2) {
        SetVehiclePos(GetPlayerVehicleID(playerid),x+3,y,z);
        LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(player1));
        SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(player1));
    }
    else SetPlayerPos(playerid,x+2,y,z);
    format(string,sizeof(string),"{FFFFFF}You have teleported to {FF0000}\"%s\"", pName(player1));
    return SendClientMessage(playerid,blue,string);
}
Reply


Messages In This Thread
[Filterscript] Need /goto toogle - by ixesas - 13.01.2012, 21:06
Re: [Filterscript] Need /goto toogle - by Snowman12 - 13.01.2012, 21:19
Re: [Filterscript] Need /goto toogle - by ixesas - 13.01.2012, 21:20
Re: [Filterscript] Need /goto toogle - by Soumi - 13.01.2012, 21:30
Re: [Filterscript] Need /goto toogle - by Mean - 13.01.2012, 21:43
Re: [Filterscript] Need /goto toogle - by ixesas - 14.01.2012, 12:11
Re: [Filterscript] Need /goto toogle - by Mean - 14.01.2012, 12:21
Re: [Filterscript] Need /goto toogle - by ixesas - 14.01.2012, 12:28
Re: [Filterscript] Need /goto toogle - by Mean - 14.01.2012, 12:31
Re: [Filterscript] Need /goto toogle - by ixesas - 14.01.2012, 12:45

Forum Jump:


Users browsing this thread: 1 Guest(s)