Jump to content
  • 0

[Problema] Comenzile cu ID


Question

Posted

Am o problema cu toate comenzile ce necesita playerid. Indiferent de ID-ul inserat, imi zice ca jucatorul nu este conectat. Fiecare comanda ce necesita ID-ul jucatorului nu merge, si apare acelasi lucru. Aveti vreo idee din ce cauza? Am verificat bine toata comanda si pare in regula, am luat si una dupa net dupa sa o testez si tot nu merge, aceeasi eroare.

CMD:aspec(playerid, params[])
{
    new id;
    if(PlayerInfo[playerid][pAdmin] < 1)
    {
        SendClientMessage(playerid, Rosu, "*** Doar adminii pot folosi aceasta comanda. ***");
    }
    if(sscanf(params,"u", id))
    {
	return SendClientMessage(playerid, Verde, "*** Forma corescta este : /aspec [ID]. ***");
    }
    if(id == playerid) return SendClientMessage(playerid,Rosu,"*** Nu poti folosi aceasta comanda pe tine. ***");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, Rosu, "*** Acest jucator nu este conectat. ***");
    if(IsSpecing[playerid] == 1)return SendClientMessage(playerid,Rosu,"*** Deja esti cu TV-ul pe cineva. ***");
    GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
    Inter[playerid] = GetPlayerInterior(playerid);
    vWorld[playerid] = GetPlayerVirtualWorld(playerid);
    TogglePlayerSpectating(playerid, true);
    if(IsPlayerInAnyVehicle(id))
    {
        if(GetPlayerInterior(id) > 0)
        {
            SetPlayerInterior(playerid,GetPlayerInterior(id));
        }
        if(GetPlayerVirtualWorld(id) > 0)
        {
            SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
        }
        PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));
    }
    else
    {
        if(GetPlayerInterior(id) > 0)
        {
            SetPlayerInterior(playerid,GetPlayerInterior(id));
        }
        if(GetPlayerVirtualWorld(id) > 0)
        {
            SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
        }
        PlayerSpectatePlayer(playerid,id);
    }
    GetPlayerName(id, Name, sizeof(Name));
    format(String, sizeof(String),"*** Esti cu TV-ul pe %s. ***",Name);
    SendClientMessage(playerid,Auriu,String);
    IsSpecing[playerid] = 1;
    IsBeingSpeced[id] = 1;
    spectatorid[playerid] = id;
    return 1;
}

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • 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.