/rb admin only
#5

I need help with kinda the same thing but it's pretty simple ( I think )

Where do I put the (IsPlayerAdmin(playerid)) in this script?

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/fly", cmdtext, true))
    {

        new Float:Pos[4];
        if(Turtle[playerid] != -1)
        {
            GetObjectRot(Turtle[playerid], Pos[0], Pos[1], Pos[3]);
            GetObjectPos(Turtle[playerid], Pos[0], Pos[1], Pos[2]);
            DestroyObject(Turtle[playerid]);
            Turtle[playerid] = -1;
            TogglePlayerSpectating(playerid, 0);
            SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
            SetPlayerFacingAngle(playerid, Pos[3]);
            KillTimer(TurtlyTimer[playerid]);
            SendClientMessage(playerid, COLOR_BLUE, "The bean effect has worn off.");
            return 1;
        }
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        GetPlayerFacingAngle(playerid, Pos[3]);
        Turtle[playerid] = CreateObject(1609, Pos[0], Pos[1], Pos[2], 0, 0, Pos[3] * -1);
        TogglePlayerSpectating(playerid, 1);
        FartsPerSecond[playerid] = 0;
        OnTurtleUpdate(playerid);
        TurtlyTimer[playerid] = SetTimerEx("OnTurtleUpdate", 30, 1, "i", playerid);
        SendClientMessage(playerid, COLOR_BLUE, "Yo gave yo turtle sum beans and now it farts all over the place!");
       
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
/rb admin only - by Edward d - 27.10.2012, 17:16
Re: /rb admin only - by Eric - 27.10.2012, 17:23
Re: /rb admin only - by Edward d - 27.10.2012, 17:36
Re: /rb admin only - by Deron_Green - 27.10.2012, 17:44
Re: /rb admin only - by Vasu99 - 27.10.2012, 19:43
Re: /rb admin only - by zDivine - 27.10.2012, 19:46
Re: /rb admin only - by Edward d - 27.10.2012, 20:02
Re: /rb admin only - by Edward d - 27.10.2012, 20:05

Forum Jump:


Users browsing this thread: 1 Guest(s)