27.10.2012, 19:43
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?
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;
}