14.04.2018, 08:27
Try this tho:
PHP код:
CMD:trolley(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,2.0, 2831.6045,2442.6086,1786.4811))
{
if(!IsPlayerAttachedObjectSlotUsed(playerid, 1)) //It checks if the object isn't (! symbol) attached to the player
{
SendClientMessage(playerid, -1, "{FFCC33} Type again /trolley to eliminate it. ");
SetPlayerAttachedObject(playerid, 0, 1349, 1);
EditAttachedObject(playerid, 0);
}
else
{
RemovePlayerAttachedObject(playerid, 1);//It removes the object
}
}
return 1;
}