(262) : error 028: invalid subscript (not an array or too many subscripts): "i"
(264) : error 001: expected token: ";", but found "if"
(266) : error 017: undefined symbol "i"
(273) : error 028: invalid subscript (not an array or too many subscripts): "i"
(274) : error 001: expected token: "}", but found "if"
(274 -- 275) : error 028: invalid subscript (not an array or too many subscripts): "IsPlayerConnected"
(276) : error 017: undefined symbol "i"
(280) : warning 209: function "OnDialogResponse" should return a value
(281) : error 054: unmatched closing brace ("}")
(282) : error 010: invalid function or declaration
(284) : error 010: invalid function or declaration
(286) : error 010: invalid function or declaration
(288) : error 010: invalid function or declaration
(292) : error 010: invalid function or declaration
(296) : error 010: invalid function or declaration
(300) : error 010: invalid function or declaration
(305) : error 010: invalid function or declaration
(307) : error 010: invalid function or declaration
(309) : error 010: invalid function or declaration
(312) : error 021: symbol already defined: "format"
(316) : error 010: invalid function or declaration
(318) : error 010: invalid function or declaration
(320) : error 010: invalid function or declaration
(325) : error 010: invalid function or declaration
(327) : error 010: invalid function or declaration
(329) : error 010: invalid function or declaration
(331) : error 021: symbol already defined: "GetPlayerPos"
riadky :
#include <a_samp>
#define DIALOGID 3000
#define COLOR_RED 0xAA3333AA
new aobjekt[1];
stock IsNumeric(const string[])
{
new length=strlen(string);
if(length==0)
{
return 0;
}
for (new i=0; i {
if (!((string[i] <= '9' && string[i] >= '0') || (i==0 && (string[i]=='-' || string[i]=='+'))))
{
return false;
}
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/controlpanel", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Admin Control Panel", "Počasí\nČas\nGravitace\nAkce pro všechny\nOstatní příkazy\nMoje příkazy", "Select", "Cancel");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOGID)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Vyber si počasí", "Slunečno\nPod Mrakem\nDeštivo\nPísečná Bouře\nSilný Déšť\nZataženo\nHurikán\nSlabší písečná bouře\nKonec Světa\nFialové nebe", "Select", "Cancel");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "Nastav Denní dobu", "1\n2\n3\n4\n5\n4\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24", "Select", "Cancel");
}
if(listitem == 2)
{
ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "Gravitace", "0\n1\n2\n5\nNormální\n10\n15", "Select", "Cancel");
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, DIALOGID+4, DIALOG_STYLE_LIST, "Akce pro všechny", "Opít\nVystřízlivět", "Select", "Cancel");
}
if(listitem == 4)
{
ShowPlayerDialog(playerid, DIALOGID+5, DIALOG_STYLE_LIST, "Ostatní příkazy", "Say\nZabít Hráče\nSpawn vozidla\nRestartovat server", "Select", "Cancel");
}
if(listitem == 5)
{
ShowPlayerDialog(playerid, DIALOGID+10, DIALOG_STYLE_LIST, "Moje příkazy", "Zdraví\nVesta", "Select", "Cancel");
}
}
return 1;
}
if(dialogid == DIALOGID+1) // počasí
{
if(response)
{
if(listitem == 0)
{
SetWeather(1);
}
if(listitem == 1)
{
SetWeather(4);
}
if(listitem == 2)
{
SetWeather(8);
}
if(listitem == 3)
{
SetWeather(19);
}
if(listitem == 4)
{
SetWeather(20);
}
if(listitem == 5)
{
SetWeather(21);
}
if(listitem == 6)
{
SetWeather(32);
}
if(listitem == 7)
{
SetWeather(42);
}
if(listitem == 8)
{
SetWeather(250);
}
if(listitem == 9)
{
SetWeather(2009);
}
}
return 1;
}
if(dialogid == DIALOGID+2)
{
if(response)
{
if(listitem == 0)
{
SetWorldTime(1);
}
if(listitem == 1)
{
SetWorldTime(2);
}
if(listitem == 2)
{
SetWorldTime(3);
}
if(listitem == 3)
{
SetWorldTime(4);
}
if(listitem == 4)
{
SetWorldTime(5);
}
if(listitem == 5)
{
SetWorldTime(6);
}
if(listitem == 6)
{
SetWorldTime(7);
}
if(listitem == 7)
{
SetWorldTime(8);
}
if(listitem == 8)
{
SetWorldTime(9);
}
if(listitem == 9)
{
SetWorldTime(10);
}
if(listitem == 10)
{
SetWorldTime(11);
}
if(listitem == 11)
{
SetWorldTime(12);
}
if(listitem == 12)
{
SetWorldTime(13);
}
if(listitem == 13)
{
SetWorldTime(14);
}
if(listitem == 14)
{
SetWorldTime(15);
}
if(listitem == 15)
{
SetWorldTime(16);
}
if(listitem == 16)
{
SetWorldTime(17);
}
if(listitem == 17)
{
SetWorldTime(18);
}
if(listitem == 18)
{
SetWorldTime(19);
}
if(listitem == 19)
{
SetWorldTime(20);
}
if(listitem == 20)
{
SetWorldTime(21);
}
if(listitem == 21)
{
SetWorldTime(22);
}
if(listitem == 22)
{
SetWorldTime(23);
}
if(listitem == 23)
{
SetWorldTime(24);
}
}
return 1;
}
if(dialogid == DIALOGID+3) // Gravitace
{
if(response)
{
if(listitem == 0)
{
SetGravity(0.000);
}
if(listitem == 1)
{
SetGravity(0.001);
}
if(listitem == 2)
{
SetGravity(0.003);
}
if(listitem == 3)
{
SetGravity(0.005);
}
if(listitem == 4)
{
SetGravity(0.008);
}
if(listitem == 5)
{
SetGravity(0.010);
}
if(listitem == 6)
{
SetGravity(0.015);
}
}
return 1;
}
if(dialogid == DIALOGID+4)
{
if(response)
{
if(listitem == 0)
{
for(new i;i {
}
if(IsPlayerConnected(i));
{
SetPlayerDrunkLevel (i, 50000);
SendClientMessageToAll(COLOR_RED,"Admin opil všechny hráče");
}
}
}
if(listitem == 1)
{
for(new i;i {
if(IsPlayerConnected(i))
{
SetPlayerDrunkLevel (i, 0);
SendClientMessageToAll(COLOR_RED,"Admin vystřízlivěl všechny hráče");
}
}
}
}
return 1;
}
if(dialogid == DIALOGID+5)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid,DIALOGID+6,DIALOG_STYLE_INPUT,"Say","Váš Text","Rekni","Zavrit");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid,DIALOGID+7,DIALOG_STYLE_INPUT,"Zabít","ID hráče kterého chcete zabít","Zabij","Zavrit");
}
if(listitem == 2)
{
ShowPlayerDialog(playerid,DIALOGID+8,DIALOG_STYLE_INPUT,"Auto","Zadej ID auta které chceš spawnout","Spawni","Zavrit");
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, DIALOGID+9, DIALOG_STYLE_MSGBOX, "Ověřění", "Opravdu chceš restartovat mód ?", "Ano", "Ne");
}
}
return 1;
}
if(dialogid == DIALOGID+6)
{
if(response == 1)
{
new str[80];
format(str,50,"ADMIN: %s",inputtext);
SendClientMessageToAll(COLOR_RED,str);
}
}
if(dialogid == DIALOGID+7)
{
if(response == 1)
{
if(!IsNumeric(inputtext) || !IsPlayerConnected(strval(inputtext))) return SendClientMessage(playerid,COLOR_RED,"Špatně zadané ID");
SetPlayerHealth(strval(inputtext),0);
SendClientMessage(strval(inputtext),COLOR_RED,"Administrátor tě zabil");
}
}
if(dialogid == DIALOGID+8)
{
if(response == 1)
{
if(!IsNumeric(inputtext) || strval(inputtext) < 400 || strval(inputtext) > 611) return SendClientMessage(playerid,COLOR_RED,"Špatné ID");
new Float:px,Float:py,Float:pz;
GetPlayerPos(playerid,px,py,pz);
aobjekt[0] = AddStaticVehicle(strval(inputtext), px+2, py, pz, 0, 181, 151);
}
}
if(dialogid == DIALOGID+9)
{
if(response == 1)
{
SendClientMessageToAll(COLOR_RED,"Administrátor restartoval server");
SendRconCommand("gmx");
}
}
if(dialogid == DIALOGID+10)
{
if(response)
{
if(listitem == 0)
{
SetPlayerHealth(playerid,100);
}
if(listitem == 1)
{
SetPlayerArmour(playerid,100);
}
}
return 1;
}
return 1;
}
public OnVehicleDeath(vehicleid)
{
DestroyVehicle(aobjekt[0]);
return 1;
}