ZCMD goes wrong..
#2

pawn Код:
CMD:spec(playerid, params[])
{
    new playa, Name[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME],String[64];
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
        if(!sscanf(params,"u",playa)) SendClientMessage(playerid,COLOR_GREY,"Lietojums: /spec <SpēlētājaID>");
        else
        {
            if(IsPlayerConnected(playa))
            {
                if(playa == playerid){SendClientMessage(playerid,COLOR_RED,"Nevar novērot pats sevi!"); return 1;}
                if(Specing[playa] == 1)
                {SendClientMessage(playerid,COLOR_RED,"Spēlētājs kādu novēro, nevar novērot viņu, kamēr viņљ novēro!"); return 1;}
                GetPlayerName(playerid, Name, sizeof(Name));
                GetPlayerName(playa, Name2, sizeof(Name2));
                format(String, sizeof(String), "[%i] %s is now spectating [%i] %s",playerid, Name,playa, Name2);
                CallLocalFunction("ircRemoteSay", "iss", 1, "#FSE", String);
                Specing[playerid] = 1;
                if(!IsPlayerInAnyVehicle(playa))
                {
                    TogglePlayerSpectating(playerid, 1);
                    PlayerSpectatePlayer(playerid, playa);
                    SetPlayerInterior(playerid,GetPlayerInterior(playa));
                    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playa));
                    return 1;
                }
                else
                {
                    TogglePlayerSpectating(playerid, 1);
                    PlayerSpectateVehicle(playerid, GetPlayerVehicleID(playa));
                    SetPlayerInterior(playerid,GetPlayerInterior(playa));
                    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playa));
                    return 1;
                }
            }
            else {SendClientMessage(playerid,COLOR_GREY,"Spēlētājs ar tādu id neeksistē!");return 1;}
        }
    }
    else {SendClientMessage(playerid,COLOR_GREY,"Tu nevari lietot љo komandu!");return 1;}
}
Reply


Messages In This Thread
ZCMD goes wrong.. - by GaGlets(R) - 13.07.2010, 18:48
Re: ZCMD goes wrong.. - by oliverrud - 13.07.2010, 18:56
Re: ZCMD goes wrong.. - by GaGlets(R) - 13.07.2010, 19:14
Re: ZCMD goes wrong.. - by oliverrud - 13.07.2010, 19:47
Re: ZCMD goes wrong.. - by Sergei - 13.07.2010, 20:05
Re: ZCMD goes wrong.. - by GaGlets(R) - 13.07.2010, 20:19
Re: ZCMD goes wrong.. - by Kar - 13.07.2010, 20:21
Re: ZCMD goes wrong.. - by GaGlets(R) - 13.07.2010, 20:47
Re: ZCMD goes wrong.. - by PotH3Ad - 13.07.2010, 20:52
Re: ZCMD goes wrong.. - by GaGlets(R) - 13.07.2010, 21:11

Forum Jump:


Users browsing this thread: 1 Guest(s)