Jump to content
  • 0

pomoc error


martinesik

Dotaz

Prosim vás Opravite mi tento jednoduchí script

 

 

//=== Začátek příběhu ==========================================================
#include 
#pragma tabsize 0
//=== Definice =================================================================
#define dcmd(%1,%2)         	if(!strcmp(cmdtext[1], #%1, true, (%2)) && (((cmdtext[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || ((cmdtext[(%2) + 1] == ' ') && (dcmd_%1(playerid, cmdtext[(%2) + 2]))))) return 1
//=== prikaz ===========================================================
public OnPlayerCommandText(playerid, cmdtext[])
{
   dcmd(weapon,          	6);
return 0;
}
//=== menu dialogu =====================================================================
dcmd_weapon(playerid,params[])
{
#pragma unused params
ShowPlayerDialog(playerid, 7542, DIALOG_STYLE_LIST, "Weapons Menu", "{#ffd700}Ručné\n{#ffd700}Pištole\n{#ffd700}Smg","Storno","");
return 1;
}
//=== Dialog ===================================================================
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

if(dialogid == 7542)
{
	if(response)
	{
		if(listitem == 0)
		{
		ShowPlayerDialog(playerid, 5522, DIALOG_STYLE_LIST, "Ručné", "{#000080}Boxer\n{#000080}Palka\n{#000080}Nož\n{#000080}Katana\n{#000080}Motorova píla\n{#000080}Sprej\n{#000080}Fotoaparat","Storno","");
   		}
   		if(listitem == 1)
		{
		ShowPlayerDialog(playerid, 5523, DIALOG_STYLE_LIST, "Pištole", "{#000080}9mm\n{#000080}9mm s tlmičom\n{#000080}Desert Eagle","Storno","");
   		}
	 }
 }

if(dialogid == 5522)
{
	if(response)
	{
		if(listitem == 0)
		{
		GivePlayerWeapon(playerid, 1, 0);
		}
		if(listitem == 1)
		{
		GivePlayerWeapon(playerid, 5, 0);
		}
		if(listitem == 2)
		{
		GivePlayerWeapon(playerid, 4, 0);
		}
		if(listitem == 3)
		{
		GivePlayerWeapon(playerid, 8, 0);
		}
		if(listitem == 4)
		{
		GivePlayerWeapon(playerid, 9, 0);
		}
		if(listitem == 5)
		{
		GivePlayerWeapon(playerid, 41, 500);
		}
		if(listitem == 6)
		{
		GivePlayerWeapon(playerid, 43, 500);
		}
	 }
 }
if(dialogid == 5523)
{
       if(response)
       {
		if(listitem == 0)
		{
		ShowPlayerDialog(playerid,8956,DIALOG_STYLE_INPUT,"Naboje","Zadajte počet nabojov:","Potvrdit","Zrušiť");
		}
		if(listitem == 1)
		{
		GivePlayerWeapon(playerid, 23, 200);
		}
		if(listitem == 2)
		{
		GivePlayerWeapon(playerid, 24, 200);
		}
	 }
 }
if(dialogid == 8956) //ID Dialógu
{
if(response == 1) //Tlačidlo 1 (Ľavé tlačidlo)
{
GivePlayerWeapon(playerid, 22, "%s", Jmeno(playerid));
}
else if(response == 0) //Tlačidlo 2 (Pravé tlačidlo)
{
//Funkcia ktorá sa vykoná ak stlačí na druhé (Pravé) tlačidlo.
}
}
return 0;
}

stock naboje(playerid)
{
new str[128];
format(str,128,"%s",inputtext); //Formát
return str;
}

//=== Konec příběhu ===========================================================

 

 

Vopred Dakujem!!!

Link to comment
Share on other sites

11 odpovědí na tuto otázku

Recommended Posts

  • 0

 

//=== Začátek příběhu ==========================================================

#include

#pragma tabsize 0

//=== Definice =================================================================

#define dcmd(%1,%2) if(!strcmp(cmdtext[1], #%1, true, (%2)) && (((cmdtext[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || ((cmdtext[(%2) + 1] == ' ') && (dcmd_%1(playerid, cmdtext[(%2) + 2]))))) return 1

//=== prikaz ===========================================================

public OnPlayerCommandText(playerid, cmdtext[])

{

dcmd(weapon, 6);

return 0;

}

//=== menu dialogu =====================================================================

dcmd_weapon(playerid,params[])

{

#pragma unused params

ShowPlayerDialog(playerid, 7542, DIALOG_STYLE_LIST, "Weapons Menu", "{#ffd700}Ručné\n{#ffd700}Pištole\n{#ffd700}Smg","Storno","");

return 1;

}

//=== Dialog ===================================================================

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

{

 

if(dialogid == 7542)

{

if(response)

{

if(listitem == 0)

{

ShowPlayerDialog(playerid, 5522, DIALOG_STYLE_LIST, "Ručné", "{#000080}Boxer\n{#000080}Palka\n{#000080}Nož\n{#000080}Katana\n{#000080}Motorova píla\n{#000080}Sprej\n{#000080}Fotoaparat","Storno","");

}

if(listitem == 1)

{

ShowPlayerDialog(playerid, 5523, DIALOG_STYLE_LIST, "Pištole", "{#000080}9mm\n{#000080}9mm s tlmičom\n{#000080}Desert Eagle","Storno","");

}

}

}

 

if(dialogid == 5522)

{

if(response)

{

if(listitem == 0)

{

GivePlayerWeapon(playerid, 1, 0);

}

if(listitem == 1)

{

GivePlayerWeapon(playerid, 5, 0);

}

if(listitem == 2)

{

GivePlayerWeapon(playerid, 4, 0);

}

if(listitem == 3)

{

GivePlayerWeapon(playerid, 8, 0);

}

if(listitem == 4)

{

GivePlayerWeapon(playerid, 9, 0);

}

if(listitem == 5)

{

GivePlayerWeapon(playerid, 41, 500);

}

if(listitem == 6)

{

GivePlayerWeapon(playerid, 43, 500);

}

}

}

if(dialogid == 5523)

{

if(response)

{

if(listitem == 0)

{

ShowPlayerDialog(playerid,8956,DIALOG_STYLE_INPUT,"Naboje","Zadajte počet nabojov:","Potvrdit","Zrušiť");

}

if(listitem == 1)

{

GivePlayerWeapon(playerid, 23, 200);

}

if(listitem == 2)

{

GivePlayerWeapon(playerid, 24, 200);

}

}

}

if(dialogid == 8956) //ID Dialógu

{

if(response == 1) //Tlačidlo 1 (Ľavé tlačidlo)

{

GivePlayerWeapon(playerid, 22,999);

}

else if(response == 0) //Tlačidlo 2 (Pravé tlačidlo)

{

//Funkcia ktorá sa vykoná ak stlačí na druhé (Pravé) tlačidlo.

}

}

return 0;

}

 

stock naboje(playerid)

{

new str[128];

format(str,128,"%s",inputtext); //Formát

return str;

}

 

//=== Konec příběhu ===========================================================

 

 

priste pridej error at nemusime projizdet cely skript

Link to comment
Share on other sites

  • 0

//=== Začátek příběhu ==========================================================
#include 
#pragma tabsize 0
//=== Definice =================================================================
#define dcmd(%1,%2) if(!strcmp(cmdtext[1], #%1, true, (%2)) && (((cmdtext[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || ((cmdtext[(%2) + 1] == ' ') && (dcmd_%1(playerid, cmdtext[(%2) + 2]))))) return 1
//=== prikaz ===========================================================
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(weapon, 6);
return 0;
}
//=== menu dialogu =====================================================================
dcmd_weapon(playerid,params[])
{
#pragma unused params
ShowPlayerDialog(playerid, 7542, DIALOG_STYLE_LIST, "Weapons Menu", "{#ffd700}Ručné\n{#ffd700}Pištole\n{#ffd700}Smg","Storno","");
return 1;
}
//=== Dialog ===================================================================
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

if(dialogid == 7542)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, 5522, DIALOG_STYLE_LIST, "Ručné", "{#000080}Boxer\n{#000080}Palka\n{#000080}Nož\n{#000080}Katana\n{#000080}Motorova píla\n{#000080}Sprej\n{#000080}Fotoaparat","Storno","");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, 5523, DIALOG_STYLE_LIST, "Pištole", "{#000080}9mm\n{#000080}9mm s tlmičom\n{#000080}Desert Eagle","Storno","");
}
}
}

if(dialogid == 5522)
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 1, 0);
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 5, 0);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 4, 0);
}
if(listitem == 3)
{
GivePlayerWeapon(playerid, 8, 0);
}
if(listitem == 4)
{
GivePlayerWeapon(playerid, 9, 0);
}
if(listitem == 5)
{
GivePlayerWeapon(playerid, 41, 500);
}
if(listitem == 6)
{
GivePlayerWeapon(playerid, 43, 500);
}
}
}
if(dialogid == 5523)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid,8956,DIALOG_STYLE_INPUT,"Naboje","Zadajte počet nabojov:","Potvrdit","Zrušiť");
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 23, 200);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 24, 200);
}
}
}
if(dialogid == 8956) //ID Dialógu
{
if(response == 1) //Tlačidlo 1 (Ľavé tlačidlo)
{
if(!response || !IsNumeric(inputtext)) return SendClientMessage(playerid, 0xFFFFFFAA, "Nezadal jsi zadny text!"); //bude se ti hodit
GivePlayerWeapon(playerid, 22, strval(inputtext)); //koukej kde byla chyba
}
else if(response == 0) //Tlačidlo 2 (Pravé tlačidlo)
{
//Funkcia ktorá sa vykoná ak stlačí na druhé (Pravé) tlačidlo.
}
}
return 0;
}

stock naboje(playerid)
{
new str[128];
format(str,128,"%s",inputtext); //Formát
return str;
}

stock IsNumeric(const string[])
{
	new length=strlen(string);
	if (length==0) return false;
	for (new i = 0; i < length; i++) {
	if (
	(string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+')
	|| (string[i]=='-' && i!=0)
	|| (string[i]=='+' && i!=0)
	) return false;
	}
	if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
	return true;
}

//=== Konec příběhu ===========================================================

Link to comment
Share on other sites

  • 0

//=== Začátek příběhu ==========================================================
#include 
#pragma tabsize 0
//=== Definice =================================================================
#define dcmd(%1,%2) if(!strcmp(cmdtext[1], #%1, true, (%2)) && (((cmdtext[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || ((cmdtext[(%2) + 1] == ' ') && (dcmd_%1(playerid, cmdtext[(%2) + 2]))))) return 1
//=== prikaz ===========================================================
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(weapon, 6);
return 0;
}
//=== menu dialogu =====================================================================
dcmd_weapon(playerid,params[])
{
#pragma unused params
ShowPlayerDialog(playerid, 7542, DIALOG_STYLE_LIST, "Weapons Menu", "{#ffd700}Ručné\n{#ffd700}Pištole\n{#ffd700}Smg","Storno","");
return 1;
}
//=== Dialog ===================================================================
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

if(dialogid == 7542)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, 5522, DIALOG_STYLE_LIST, "Ručné", "{#000080}Boxer\n{#000080}Palka\n{#000080}Nož\n{#000080}Katana\n{#000080}Motorova píla\n{#000080}Sprej\n{#000080}Fotoaparat","Storno","");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, 5523, DIALOG_STYLE_LIST, "Pištole", "{#000080}9mm\n{#000080}9mm s tlmičom\n{#000080}Desert Eagle","Storno","");
}
}
}

if(dialogid == 5522)
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 1, 0);
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 5, 0);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 4, 0);
}
if(listitem == 3)
{
GivePlayerWeapon(playerid, 8, 0);
}
if(listitem == 4)
{
GivePlayerWeapon(playerid, 9, 0);
}
if(listitem == 5)
{
GivePlayerWeapon(playerid, 41, 500);
}
if(listitem == 6)
{
GivePlayerWeapon(playerid, 43, 500);
}
}
}
if(dialogid == 5523)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid,8956,DIALOG_STYLE_INPUT,"Naboje","Zadajte počet nabojov:","Potvrdit","Zrušiť");
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 23, 200);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 24, 200);
}
}
}
if(dialogid == 8956) //ID Dialógu
{
if(response == 1) //Tlačidlo 1 (Ľavé tlačidlo)
{
if(!response || !IsNumeric(inputtext)) return SendClientMessage(playerid, 0xFFFFFFAA, "Nezadal jsi zadny text!"); //bude se ti hodit
GivePlayerWeapon(playerid, 22, strval(inputtext)); //koukej kde byla chyba
}
else if(response == 0) //Tlačidlo 2 (Pravé tlačidlo)
{
//Funkcia ktorá sa vykoná ak stlačí na druhé (Pravé) tlačidlo.
}
}
return 0;
}

stock naboje(playerid)
{
new str[128];
format(str,128,"%s",inputtext); //Formát
return str;
}

stock IsNumeric(const string[])
{
	new length=strlen(string);
	if (length==0) return false;
	for (new i = 0; i < length; i++) {
	if (
	(string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+')
	|| (string[i]=='-' && i!=0)
	|| (string[i]=='+' && i!=0)
	) return false;
	}
	if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
	return true;
}

//=== Konec příběhu ===========================================================

 

 

Dakujem ti za radu !!!! Si velmi mudri muz ale mam este jednu prozbu chcel by som to dat aj na ine zbrane tak od kadial to mam skopirovat mislim v tom fs????!!!!!

Link to comment
Share on other sites

  • 0

Tak mam jednu chybu v mode: C:\Documents and Settings\kosar\Desktop\The Godfather\gamemode\gf.pwn(24793) : error 004: function "NameTimer" is not implemented A tu je riadok: NameTimer(); ako to opravim ?

Link to comment
Share on other sites

  • 0
Tak mam jednu chybu v mode: C:\Documents and Settings\kosar\Desktop\The Godfather\gamemode\gf.pwn(24793) : error 004: function "NameTimer" is not implemented A tu je riadok: NameTimer(); ako to opravim ?

prečo to pišes do cudzieho topiku?

Link to comment
Share on other sites

  • 0
Tak mam jednu chybu v mode: C:\Documents and Settings\kosar\Desktop\The Godfather\gamemode\gf.pwn(24793) : error 004: function "NameTimer" is not implemented A tu je riadok: NameTimer(); ako to opravim ?

prečo to pišes do cudzieho topiku?

jak do zleho topiku sak do help to napisal ci ? ci mne zle ukazuje ???

Link to comment
Share on other sites

  • 0
Tak mam jednu chybu v mode: C:\Documents and Settings\kosar\Desktop\The Godfather\gamemode\gf.pwn(24793) : error 004: function "NameTimer" is not implemented A tu je riadok: NameTimer(); ako to opravim ?

prečo to pišes do cudzieho topiku?

jak do zleho topiku sak do help to napisal ci ? ci mne zle ukazuje ???

 

laces len pise ze to dal do mojho topiku a neurobi si vlasni tak to mislel ze cudzi topik.

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...