Jump to content
  • 0

pomoc [Help]OnSelectedMenuRow oddělování.


癌癌癌

Dotaz

Sry neveděl jsem žádná klíčová slova zkoušel sem třeba "oddělování menu" "MenuRow"...ale nic to nenašlo tak to pišu...Pokud to tu nekde je hoďte mi pls link DÍKY!

 

Mám problém s SelectedMenuRow jak se tam maj oddělit třeba řidičák a třeba nějaky povolání..?Mě to u toho druhýho pořád píše Invalid function or delicration...

 

takto to vypadá:

public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:Current = GetPlayerMenu(playerid);

new string[256];
if (Current == swat ) {
switch(row) {
case 0:{
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "[!] Hrac %s se pripojil k swatu", pname);
GivePlayerWeapon(playerid,25,500);
SendClientMessageToAll(COLOR_YELLOW, string);
printf(string); //
ResetPlayerWeapons(playerid);
iPlayerRole[playerid] = 1; 
SetPlayerColor(playerid,COLOR_YELLOW);
}
}
}
return 1;
}
if (Current == vodicakmenu ) {
switch(row) {
case 0:{
{
(ERROR)if (ridicak[playerid] == 1) {
SendClientMessage(playerid, COLOR_YELLOW, "Kolik si chceš kupovat řidičáků?Vždyť už ho máš! !"); //prepiste na svoje
(ERROR)}else{
(ERROR)if(GetPlayerMoney(playerid) < 1999) {
SendClientMessage(playerid, COLOR_YELLOW, "Nemáš dost peněz(2000) !"); //aj toto
}else{
GetPlayerName(playerid, pname, 30);
format(string, 256, "Hráč %s si koupil řidičský průkaz!", pname);
SendClientMessageToAll(COLOR_YELLOW,string); //farba
GivePlayerMoney(playerid,-2000); //kolko vam to strhne za kupenie vodicaka
ridicak[playerid] = 1;
}
}
}
}
}
}
return 1;
}

 

Jinak oboje sem dělal podle navodů...a vše mam i newy atd... (" } " a " { " neřešte to si umim opravit sam ale pořad Invalid function :'() V zavorce mate u ktere radky error je děkuji...

Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:Current = GetPlayerMenu(playerid), string[128];

if (Current == swat )
{
	switch(row)
	{
		case 0:
		{
			GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
			format(string, sizeof(string), "[!] Hrac %s se pripojil k swatu", pname);
			GivePlayerWeapon(playerid,25,500);
			SendClientMessageToAll(COLOR_YELLOW, string);
			printf(string); //
			ResetPlayerWeapons(playerid);
			iPlayerRole[playerid] = 1;
			SetPlayerColor(playerid,COLOR_YELLOW);
		}
	}
}
if (Current == vodicakmenu )
{
	switch(row)
	{
		case 0:
		{
			if (ridicak[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_YELLOW, "Kolik si chceš kupovat řidičáků?Vždyť už ho máš! !"); //prepiste na svoje
			}else{

				if(GetPlayerMoney(playerid) < 1999)
				{
					SendClientMessage(playerid, COLOR_YELLOW, "Nemáš dost peněz(2000) !"); //aj toto
				}else{
					GetPlayerName(playerid, pname, 30);
					format(string, 256, "Hráč %s si koupil řidičský průkaz!", pname);
					SendClientMessageToAll(COLOR_YELLOW,string); //farba
					GivePlayerMoney(playerid,-2000); //kolko vam to strhne za kupenie vodicaka
					ridicak[playerid] = 1;
				}
			}
		}
	}
}
return 1;
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...