Dialog ..
#1

hey guys.
i did dialog of teams
can you give me fix code?

look , the command is :

Quote:

if(strcmp(cmdtext, "/ClansWar", true) == 0 || strcmp(cmdtext, "//Cw", true) == 0)
{
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, COLOR_ORANGE, "бшелйн дбайн майжеш дчмап ееаш щм дщшъ");
ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST, "Team Select","Team A\nTeam B","бйием","айщеш");
SetPlayerPos(playerid,-1392.2168,-119.6609,14.1484); // Clans war
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,22,9999);
GivePlayerWeapon(playerid,26,9999);
GivePlayerWeapon(playerid,28,9999);
GivePlayerWeapon(playerid,31,9999);
GivePlayerWeapon(playerid,34,9999);
new string[50];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,1;
return 1;
}

dialog response :
Quote:

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

if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 1:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
SetPlayerPos(playerid, -1369.6040,-79.8589,14.4703);
SendClientMessage(playerid, COLOR_BLUE, "бшелйн дбайн мчбецд ос' 2");
}
case 1: // The second item listed
{
SetPlayerPos(playerid, -1203.8551,-226.8619,14.4703);
SendClientMessage(playerid, COLOR_BLUE, "бшелйн дбайн мчбецд ос' 1");


}
}
}
return 1;
}

return 0;
}

Please Help..
Reply
#2

The first thing that I see being wrong is the dialog IDs. In your command, ShowPlayerDialog displays a dialog with ID 3. However, the OnDialogResponse callback does not handle the dialog ID (handles ID 1 instead). So this has to be changed for it to initially work.

Also, why, in the end of the command, do you get the player's name? Also, I suggest using this:
pawn Код:
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
So the array size corresponds to the current SA-MP version.
Reply
#3

bro you can give me a code??

look this is my errors

Quote:

E:\New folder\gamemodes\TClanServ1.pwn(1162) : warning 235: public function lacks forward declaration (symbol "SetupPlayerForClassSelection")
E:\New folder\gamemodes\TClanServ1.pwn(1265) : warning 235: public function lacks forward declaration (symbol "GameModeExitFunc")
E:\New folder\gamemodes\TClanServ1.pwn(1550) : warning 202: number of arguments does not match definition
E:\New folder\gamemodes\TClanServ1.pwn(2356) : warning 204: symbol is assigned a value that is never used: "string"
E:\New folder\gamemodes\TClanServ1.pwn(2364) : error 029: invalid expression, assumed zero
E:\New folder\gamemodes\TClanServ1.pwn(2364) : error 004: function "OnDialogResponse" is not implemented
E:\New folder\gamemodes\TClanServ1.pwn(2367) : error 017: undefined symbol "response"
E:\New folder\gamemodes\TClanServ1.pwn(2369) : error 017: undefined symbol "dialogid"
E:\New folder\gamemodes\TClanServ1.pwn(2373) : error 017: undefined symbol "listitem"
E:\New folder\gamemodes\TClanServ1.pwn(2389) : error 002: only a single statement (or expression) can follow each "case"
E:\New folder\gamemodes\TClanServ1.pwn(2389) : warning 215: expression has no effect
E:\New folder\gamemodes\TClanServ1.pwn(2394) : error 030: compound statement not closed at the end of file (started at line 1313)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Reply
#4

Some 1 Please Help ME With This nDialog ..
Reply
#5

??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)