Spectate
#2

pawn Код:
CMD:stebeti(playerid, params[])
{
    new id, vardas[25];
    if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, 0xFF0000AA, "Jus ne administratorius"); //Jeigu zaidejas ne adminas tada jam nusiuncia sia zinute. As naudoju PVarInt o jus galite naudoti kintamuosius. O jeigu pas jus grp modas tada naudokite ten PlayerDb[playerid]... Kazkaip ten :D
    if(sscanf(params, "r", id)) return SendClientMessage(playerid, 0xFF9900, "Naudojimas: /stebeti [Nickas]"); //Jeigu zaidejas iraso neteisingai komanda tada jam nusiuncia sia zinute.
    if(!IsPlayerConnected(id))   return SendClientMessage(playerid, 0xFF0000AA, "Tokio ћaidejo nera");//Patikrina ar zaidejas prisijunges.
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Tokio ћaidejo nera");//Patikrina ar vardas irasytas teisingai.
    if(IsPlayerNPC(id)) return SendClientMessage(playerid, 0xFF0000AA, "Tokio ћaidejo nera");//Patikrina ar ivestas zaidejas nera NPC botas.
    if(id == playerid) return SendClientMessage(playerid,0xFF0000AA,"Jus negalite stebeti saves!"); //Patikrina ar zaidejas neisirase savo nicko.
    new msg[100]; //Stringas zinutei.
    GetPlayerName(playerid, vardas, sizeof(vardas)); //Gauna zaidejo varda.
    SetCameraBehindPlayer(id);//Nustato zaidejo cameros pozicija uz to zaidejo kuri jis irase.
    format(msg, sizeof(msg), "Stebite ћaideja %s. Noredami baigti raљykite /baigti", vardas); //Formatinam sita zinute.
    SendClientMessage(playerid, 0xFFFF00AA, msg);//Nusiunciam suformatinta zinute.
    return 1;
}
Also, specing yourself is not possible
Reply


Messages In This Thread
Spectate - by Louris - 15.01.2013, 15:15
Re: Spectate - by NicholasA - 15.01.2013, 15:24
Re: Spectate - by Louris - 15.01.2013, 15:42
AW: Re: Spectate - by Elorreli - 15.01.2013, 15:49

Forum Jump:


Users browsing this thread: 1 Guest(s)