is this right? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: is this right? (
/showthread.php?tid=584828)
is this right? -
PowerF - 08.08.2015
Код:
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?
Re: is this right? -
AIped - 08.08.2015
i would add an
Re: is this right? -
PowerF - 08.08.2015
where should i add it?
Re: is this right? -
zT KiNgKoNg - 08.08.2015
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;
}
Re: is this right? -
PowerF - 08.08.2015
umm,is it if the player cuffed cant use the command?