26.06.2012, 08:39
I recommend you use ZCMD, however, a normal command that you will have to put under OnPlayerCommandText callback:
pawn Code:
if(!strcmp(cmdtext,"/removemyobjects", true)) // If the command submitted.
{
for(new ao; ao < 10; ao++) // This loops through the ten slots, so all codes between the for braces will happen for the ten
{
if(IsPlayerAttachedObjectSlotUsed(playerid, ao)) // Checks if the slots are used.
{
RemovePlayerAttachedObject(playerid, ao); // If so remove the object(s).
}
}
return 1;
}