Detaljan opis problema:Kako da napravim da se ova komanda moze koristiti samo ako si admin(ne rcon)
Dio skripte
stock ShowInteriorDialog(playerid)
{
new dialog_string;
for(new i = 0; i < sizeof(InteriorDialogNames); i++) {
if(!i) {
format(dialog_string, sizeof(dialog_string), InteriorDialogNames);
}
else {
format(dialog_string, sizeof(dialog_string), "%s\n%s", dialog_string, InteriorDialogNames);
}
}
return ShowPlayerDialog(playerid, DIALOG_INTERIOR_MENU, DIALOG_STYLE_LIST, "nInteriors Teleport Dialog", dialog_string, "Select", "Cancel");
}
public OnFilterScriptInit()
{
print(" nInteriors by Norn successfully loaded.");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/ninteriors", cmdtext, true, 10) == 0) {
ShowInteriorDialog(playerid);
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid) {
case DIALOG_INTERIOR_MENU:
{
if(response) {
new arrayid = listitem, string;
SetPlayerPos(playerid, InteriorDialogData, InteriorDialogData, InteriorDialogData);
SetPlayerInterior(playerid, InteriorDialogInteriors);
SetPlayerFacingAngle(playerid, InteriorDialogData);
format(string, sizeof(string), "[INTERIOR:] You teleported to interior ' %s '.", InteriorDialogNames);
SendClientMessage(playerid, 0xADD8E6FF, string);
}
}
}
return 1;
}[
/code]
Neke slike/video za lakse dobivanje pomoci(neobavezno): 