15.05.2014, 17:07
You have a missing bracket.
pawn Код:
CMD:dynamicgift(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid))
{
new string[128], Float:Position[4];
if(dynamicgift == 0)
{
GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
GetPlayerFacingAngle(playerid, Position[3]);
dynamicgift = CreateDynamicObject(19054, Position[0], Position[1], Position[2]-0.4, 0.0, 0.0, Position[3], -1, -1, -1, 200.0);
dynamicgift3DText = CreateDynamic3DTextLabel("/getgift\nTo reach inside.",COLOR_YELLOW,Position[0], Position[1], Position[2]+0.25,8.0);
SetPlayerPos(playerid, Position[0], Position[1], Position[2]+3);
format(string, sizeof(string), "AdmCmd: %s has placed the dynamic gift.", GetPlayerNameEx(playerid));
ABroadCast( COLOR_LIGHTRED, string, 1337);
}
else
{
DestroyDynamicObject(dynamicgift);
dynamicgift = 0;
DestroyDynamic3DTextLabel( Text3D:dynamicgift3DText );
format(string, sizeof(string), "AdmCmd: %s has destroyed the dynamic gift.", GetPlayerNameEx(playerid));
ABroadCast( COLOR_LIGHTRED, string, 1337);
}
}// This has no open.
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "You must be on foot to use this command.");
return 1;
}
return 1;
}