Jump to content

Comanda /specoff


SeNaToRuL.

Recommended Posts

Salut utilizez gamemode burned si cand dau /specoff imi da respawn.. dar eu vreau sa ma teleporteze in ultima locatie..

Comanda:

YCMD:specoff(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] < 2) return SCM(playerid, COLOR_WHITE, AdminOnly);
    if(Spectate[playerid] == 255) return true;
    TogglePlayerControllable(playerid, 1);
    TogglePlayerSpectating(playerid, 0);
    SetPlayerInterior(playerid,Unspec[playerid][sPint]);
    PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
    PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
    Unspec[playerid][sLocal] = 255;
    gTeam[playerid] = PlayerInfo[playerid][pTeam];
    SetPlayerToTeamColor(playerid);
    SCM(playerid, -1, "Nu mai esti spectator!");
    //SpawnPlayer(playerid);
    Iter_Remove(MySpec[Spectate[playerid]], playerid);
    Spectate[playerid] = 255;
    SpecPlayers[playerid] = 0;
    LastRecon[playerid] = 1;
    PlayerTextDrawHide(playerid, SpectatorTD);
    return true;
}

Link to comment
Share on other sites

Acum 19 ore, SeNaToRuL. a spus:

Salut utilizez gamemode burned si cand dau /specoff imi da respawn.. dar eu vreau sa ma teleporteze in ultima locatie..

Comanda:

YCMD:specoff(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] < 2) return SCM(playerid, COLOR_WHITE, AdminOnly);
    if(Spectate[playerid] == 255) return true;
    TogglePlayerControllable(playerid, 1);
    TogglePlayerSpectating(playerid, 0);
    SetPlayerInterior(playerid,Unspec[playerid][sPint]);
    PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
    PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
    Unspec[playerid][sLocal] = 255;
    gTeam[playerid] = PlayerInfo[playerid][pTeam];
    SetPlayerToTeamColor(playerid);
    SCM(playerid, -1, "Nu mai esti spectator!");
    //SpawnPlayer(playerid);
    Iter_Remove(MySpec[Spectate[playerid]], playerid);
    Spectate[playerid] = 255;
    SpecPlayers[playerid] = 0;
    LastRecon[playerid] = 1;
    PlayerTextDrawHide(playerid, SpectatorTD);
    return true;
}

La ora actuala observ ca nu iti mai da spawn pentru ca ai scos tu functia.

// La inceputul gm-ului pe langa celelalte variabile
new Float:InainteDeSpec[MAX_PLAYERS][3];
//

// Adaugi la comanda /spec
GetPlayerPos(playerid, InainteDeSpec[playerid][0], InainteDeSpec[playerid][1], InainteDeSpec[playerid][2]);
//

// Asta adaugi la comanda /specoff
SetPlayerPos(playerid, InainteDeSpec[playerid][0], InainteDeSpec[playerid][1], InainteDeSpec[playerid][2]);
//

 

Edited by StrikerM

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

Acum 2 ore, Rafaly a spus:

 

 Eroare : warning 219: local variable "InainteDeSpec" shadows a variable at a preceding level

Linie new Float:InainteDeSpec[MAX_PLAYERS][3];

Adauga 

new Float:InainteDeSpec[MAX_PLAYERS][3];

La inceputul gm-ului pe langa celelalte variabile, si sterge linia

new Float:InainteDeSpec[MAX_PLAYERS][3];

din comanda /spec

Edited by StrikerM

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

Acum 2 ore, Rafaly a spus:

Ms mult!Ma poti ajuta cu inca o chestie?Cum ai mai explicat la un topic precedent,la comanda /admins as dorii ca fiecare rank sa aiba un alt nume iar ca in chat sa scrie in fata numelui de ex(Fondator nume: salut).Daca este nevoie ,voi face un topic nou.

Topic nou te rog.

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.