is this right?
#1

Код:
CMD:toys(playerid,params[])
{
    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED)
    {
		return	SendClientMessage(playerid, 0xFFFFFFFF, "You Cant Use This Command.");
    }
	new string[128];
	new dialog[500];
	for(new x;x<MAX_OSLOTS;x++)
	{
        if(IsPlayerAttachedObjectSlotUsed(playerid, x))
		{	format(string, sizeof(string), ""COL_WHITE"Slot:%d :: "COL_GREEN"Used Slot\n", x);    }
		else format(string, sizeof(string), ""COL_WHITE"Slot:%d\n", x);
		strcat(dialog,string);
   	}
   	ShowPlayerDialog(playerid, DIALOG_ATTACH_INDEX_SELECTION, DIALOG_STYLE_LIST,"Player Objects/Attachment: (Select Slot)", dialog, "Select", "Close(X)");
	return 1;
}
is this right,if the player is cuffed he/she cant use /toys command?
Reply
#2

i would add an
pawn Код:
else
Reply
#3

where should i add it?
Reply
#4

Here, I fix the indentation; It did my head in.


Note: Ignore the "Tabs", its the way copy/paste is affected out-side of SBT.
pawn Код:
CMD:toys(playerid,params[])
{
    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED)
    {
        return  SendClientMessage(playerid, 0xFFFFFFFF, "You Cant Use This Command.");
    }
   
    new string[128];
    new dialog[500];

    for(new x;x<MAX_OSLOTS;x++)
    {
        if(IsPlayerAttachedObjectSlotUsed(playerid, x))
            format(string, sizeof(string), ""COL_WHITE"Slot:%d :: "COL_GREEN"Used Slot\n", x);
        else
            format(string, sizeof(string), ""COL_WHITE"Slot:%d\n", x);

        strcat(dialog,string);
    }
    ShowPlayerDialog(playerid, DIALOG_ATTACH_INDEX_SELECTION, DIALOG_STYLE_LIST,"Player Objects/Attachment: (Select Slot)", dialog, "Select", "Close(X)");
    return 1;
}
Reply
#5

umm,is it if the player cuffed cant use the command?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)