[Pomoc] Trebam komandu , moja nevalja.

Započeo Darko, Decembar 20, 2010, 22:36:00 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

if(strcmp(cmd, "/tv", true) == 0 || strcmp(cmd, "/recon", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pDonateRank] > 0)
        {
            if(WatchingTV[playerid] < 1)
    {
        GetPlayerPos(playerid, Unspec[playerid][Coords][0],Unspec[playerid][Coords][1],Unspec[playerid][Coords][2]);
        }
        }
            new hkey = PlayerInfo[playerid][pPhousekey];
new house = PlayerInfo[playerid][pLocal];
if(Spectate[playerid] == 255 && PlayerInfo[playerid][pLocal] != 255 || Spectate[playerid] == 255 && PlayerInfo[playerid][pAdmin] > 0)
{
GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
Unspec[playerid][sPint] = PlayerInfo[playerid][pInt];
Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal];
PlayerInfo[playerid][pLocal] = 255;
gTeam[playerid] = 0;
}
tmp = strtok(cmdtext, idx);
if(strcmp("off", tmp, true, strlen(tmp)) == 0)
{
    if(WatchingTV[playerid] > 0)
    {
        WatchingTV[playerid] = 0;
Spectate[playerid] = 253;
GameTextForPlayer(playerid, "~w~                TV~n~~r~                Ugasen", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Negledate TV !");
    return 1;
}
}
if(PlayerInfo[playerid][pAdmin] < 1)
{
if(house == 255)
{
GameTextForPlayer(playerid, "~r~Nema ovdje TV", 5000, 1);
return 1;
}
}
if(PlayerInfo[playerid][pAdmin] > 1 || PlayerToPoint(12.0, playerid, HouseInfo[hkey][hExitx], HouseInfo[hkey][hExity],HouseInfo[hkey][hExitz]))
{
    if(HouseInfo[hkey][hHealthx] != 1)
    {
        GameTextForPlayer(playerid, "~r~Taj upgrade nije kupljen", 5000, 1);
        return 1;
    }
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
        Spectate[playerid] = giveplayerid;
new Float:health;
GetPlayerHealth(Spectate[playerid], health);
GetPlayerName(Spectate[playerid], giveplayer, sizeof(giveplayer));
new cash =  GetPlayerMoney(Spectate[playerid]);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, sizeof(string), "Recon: (%d) %s $%d H:%.0f",Spectate[playerid],giveplayer,cash,health);
}
else
{
format(string, sizeof(string), "UAV: (%d) %s",Spectate[playerid],giveplayer);
}
SendClientMessage(playerid, COLOR_GREEN, string);
WatchingTV[playerid] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "Osoba nije dostupna.");
}
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "   Niste u vasoj kuci !");
return 1;
}
}
return 1;
}


To je moja /recon komanda koju sam dobil na modu koji editam ,

moze mi netko poslati pravu /recon ?.. Da onako pratis igraca i vidis sta radi ? Bio bih zahvalan

Evo ti : /spec komanda , zcmd...
public OnPlayerCommandText(playerid, cmdtext[])
{
   dcmd(spec,4,cmdtext);
   return 0;
}

i onda
dcmd_spec(playerid, params[])
{
   new
   id;
   if (sscanf(params, "u", id)) SendClientMessage(playerid,0xFF0000AA, "[Koriscenje]: /spec [ID]");
   else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid,0xFF0000AA, "Igrac nije pronadjen.");
   else
   if(IsPlayerAdmin(playerid))
   {
       TogglePlayerSpectating(playerid, 1);
   }
   return 1;
}

Nadam se da sam ti pomogao .... UZIVAJ :)
Poslednja Izmena: Decembar 20, 2010, 22:41:51 POSLE PODNE od [BM]Ivan_Ilic

Ivane kakav tebe /spec spopao -.-

Darko, koliko znam msm da je to izbaceno iz sampa (to za gledanje TVa) ako gresim nek me neko ispravi
Cyb3r
           Roleplay
                        In progress by: tWix

Forum: Klik
IP: 62.75.247.14:9545

Citat: DarkoDa onako pratis igraca i vidis sta radi ? Bio bih zahvalan

Ivane nemam ja zcmd procesor taj.. kak se to zove vise , ja imam nista :D cmd samo...

Neznam , ja imam onaj CroMafija mod , na njemu radim par izmjena i tako to igram se...

Pa hocu /recon komandu , tak da mogu pratiti.. imam /uncon nemam /recon :D