Jump to content

Question

Posted

salls am fakt givecash in dialog-uri si imi da niste errori:

aici is toate dialog-urile

if(strcmp(cmdtext, "/givecash2", true) == 0)
	{
 	ShowPlayerDialog(playerid,GiveCash,DIALOG_STYLE_INPUT,"Player ID","Please type the player id:","Next","Cancel");
 	return 1;
 	}
dupa accea am bagat la OnDialogResponse:
if(dialogid == GiveCash)
	{
	    if(!response)
	    ShowPlayerDialog(playerid,GiveCash2,DIALOG_STYLE_INPUT,"Ammout","Please type the ammount of money:","Transfer","Cancel");
	    return 1;
	}

if(dialogid == GiveCash2)
	{
	    if(!response)
	    if (IsPlayerConnected(giveplayerid)) {
			GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
			GetPlayerName(playerid, sendername, sizeof(sendername));
			playermoney = GetPlayerMoney(playerid);
			if (moneys > 0 && playermoney >= moneys) {
				GivePlayerMoney(playerid, (0 - moneys));
				GivePlayerMoney(giveplayerid, moneys);
				format(string, sizeof(string), "You have sent %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);
				SendClientMessage(playerid, COLOR_YELLOW, string);
				format(string, sizeof(string), "You have recieved $%d from %s(player: %d).", moneys, sendername, playerid);
				SendClientMessage(giveplayerid, COLOR_YELLOW, string);
				printf("%s(playerid:%d) has transfered %d to %s(playerid:%d)",sendername, playerid, moneys, giveplayer, giveplayerid);
			}
			else {
				SendClientMessage(playerid, COLOR_YELLOW, "Invalid transaction amount.");
			}
		}
		else {
				format(string, sizeof(string), "%d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_YELLOW, string);
			}
		return 1;
	}
asta si imi da errorile astea:
C:\Documents and Settings\user\My Documents\RDU&FS&Maps&Servers\RDU\gamemodes\RDU.pwn(13905) : error 010: invalid function or declaration
C:\Documents and Settings\user\My Documents\RDU&FS&Maps&Servers\RDU\gamemodes\RDU.pwn(13907) : error 010: invalid function or declaration
C:\Documents and Settings\user\My Documents\RDU&FS&Maps&Servers\RDU\gamemodes\RDU.pwn(13909) : error 010: invalid function or declaration
C:\Documents and Settings\user\My Documents\RDU&FS&Maps&Servers\RDU\gamemodes\RDU.pwn(13912) : error 010: invalid function or declaration
C:\Documents and Settings\user\My Documents\RDU&FS&Maps&Servers\RDU\gamemodes\RDU.pwn(13914) : error 010: invalid function or declaration
C:\Documents and Settings\user\My Documents\RDU&FS&Maps&Servers\RDU\gamemodes\RDU.pwn(13915) : error 010: invalid function or declaration
C:\Documents and Settings\user\My Documents\RDU&FS&Maps&Servers\RDU\gamemodes\RDU.pwn(13919) : error 010: invalid function or declaration
C:\Documents and Settings\user\My Documents\RDU&FS&Maps&Servers\RDU\gamemodes\RDU.pwn(13928) : error 010: invalid function or declaration
C:\Documents and Settings\user\My Documents\RDU&FS&Maps&Servers\RDU\gamemodes\RDU.pwn(13932) : error 010: invalid function or declaration
C:\Documents and Settings\user\My Documents\RDU&FS&Maps&Servers\RDU\gamemodes\RDU.pwn(13936) : error 010: invalid function or declaration

help me va rogg:(!!!

Fara reclama in semnatura!

4 answers to this question

Recommended Posts

Posted

La OnDialogResponse:

[pawn]new string[256];

new giveplayerid, moneys;

new playermoney;

if(dialogid == GiveCash)

{

if(!response)

ShowPlayerDialog(playerid,GiveCash2,DIALOG_STYLE_INPUT,"Ammout","Please type the ammount of money:","Transfer","Cancel");

return 1;

}

if(dialogid == GiveCash2)

{

if(!response)

if (IsPlayerConnected(giveplayerid)) {

GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

playermoney = GetPlayerMoney(playerid);

if (moneys > 0 && playermoney >= moneys) {

GivePlayerMoney(playerid, (0 - moneys));

GivePlayerMoney(giveplayerid, moneys);

format(string, sizeof(string), "You have sent %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);

SendClientMessage(playerid, COLOR_YELLOW, string);

format(string, sizeof(string), "You have recieved $%d from %s(player: %d).", moneys, sendername, playerid);

SendClientMessage(giveplayerid, COLOR_YELLOW, string);

printf("%s(playerid:%d) has transfered %d to %s(playerid:%d)",sendername, playerid, moneys, giveplayer, giveplayerid);

}

else {

SendClientMessage(playerid, COLOR_YELLOW, "Invalid transaction amount.");

}

}

else {

format(string, sizeof(string), "%d is not an active player.", giveplayerid);

SendClientMessage(playerid, COLOR_YELLOW, string);

}

return 1;

}[/pawn]

LA OnPlayerCommand:

[pawn]if(strcmp(cmdtext, "/givecash2", true) == 0)

{

ShowPlayerDialog(playerid,GiveCash,DIALOG_STYLE_INPUT,"Player ID","Please type the player id:","Next","Cancel");

return 1;

}

if(IsPlayerFlooding(playerid) && !IsPlayerAdmin(playerid))

{

SendClientMessage(playerid, 0xFF0000FF, "* You can only use commands once every two seconds.");

return 1;

}[/pawn]

La inceputul scriptului :

[pawn]#define GiveCash2 09632

#define GiveCash 09632[/pawn]

EDIT :

Oricum nu merge,apare doar dialogul unde pui ID-ul jucatorului,apoi dai NEXT ,se inchide dialogul si gata.
nici eu nu ma pricep la dialoguri.

qdbjz10.png

Posted

nu merge nici cum ai zis tu...teoretic tu miai dat tot aia ce am pus si eu doar ca fara TAB:))...

pls altcineva help!!!chiar am nevoie de commanda asat si nush cum sa fac sa mearga...

Fara reclama in semnatura!

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.