if(dialogid == 13) { if(response == 1) { SendClientMessage(playerid, 0x33AA33AA, "/kill"); } if(response == 0) { SendClientMessage(playerid, 0x33AA33AA, "You canceled. Was it a mistake? /help"); return 1; } }
if(dialogid == 13) { if(response == 0) { SendClientMessage(playerid, 0x33AA33AA, "You canceled. Was it a mistake? /help"); return 1; } if(response == 1) { SendClientMessage(playerid, 0x33AA33AA, "/kill"); } return 1; }
Originally Posted by [ĦŁ₣
ЉǾǖŦĦЗŁΛẄ ]
I never understand why people put braces at the end of statement lines: if(something){ somethingelse } else { anothersomething } to me that looks messy i prefer to do this if(something) { somethingelse } else { anothersomething } ah well up to whoever is scriptin :P for the dialogs try doing the 0 [false] first then just an else instead if another check, after all it can only be 1 or 0 so if(response == 0) this(); else that(); Hope that helps ![]() |
public SomeCallback {
if(ifstatement)
{
//action;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { //=======================================PD INVITE DIALOG==============================// #pragma tabsize 0 if(dialogid == 300) { if(response == 1) { GameTextForPlayer(playerid,"~B~Welcome to the LSP",5000,5); SetPlayerRank(playerid, 2); SetPlayerColor(playerid,0x2641FEAA); } if(response == 0) { SendClientMessage(playerid, 0x33AA33AA, "You canceled. Was it a mistake? Ask again."); return 1; } } if(dialogid == 301) { if(response == 1) { GameTextForPlayer(playerid,"~B~Welcome to the Grove Street Families",5000,5); SetPlayerRank(playerid, 3); SetPlayerColor(playerid,0x10F441AA); } if(response == 0) { SendClientMessage(playerid, 0x33AA33AA, "You canceled. Was it a mistake? Ask again."); return 1; } if(dialogid == 13) { if(response == 0) SendClientMessage(playerid, 0x33AA33AA, "You canceled. Was it a mistake? Ask again."); else SendClientMessage(playerid, 0x33AA33AA, "ewgweg"); return 1; } if(dialogid == 304) { if(response == 1) { PlayerInfo[playerid][Drugs]++; } if(response == 0) { } PlayerInfo[playerid][Drugs]++; return 1; } if(dialogid == 281) { if(response == 1) { GameTextForPlayer(playerid,"~B~You are a suspect now",5000,5); SetPlayerColor(playerid,0xFF8000FF); } if(response == 0) { SendClientMessage(playerid, 0x33AA33AA, "Ah, just evade."); SetPlayerColor(playerid,0xFF8000FF); return 1; } } if(dialogid == 303) { if(response == 1) { GameTextForPlayer(playerid,"~B~You have left your gang",5000,5); SetPlayerRank(playerid, 0); SetPlayerColor(playerid,0xFFFFFFAA); } } if(response == 0) { SendClientMessage(playerid, 0x33AA33AA, "/leavefaction again if you made a mistake"); return 1; } } return 1; }
} if(strcmp(cmd,"/help", true) == 0) { ShowPlayerDialog(playerid,428,DIALOG_STYLE_MSGBOX,"help","Wanna continue to the help system?","Yes","No"); return 1; }
if(dialogid == 428) { if(response == 0) { SendClientMessage(playerid, 0x33AA33AA, "Yes"); } else { SendClientMessage(playerid, 0x33AA33AA, "No"); } }
if(dialogid == 300)
{
if(response)
{
GameTextForPlayer(playerid,"~B~Welcome to the LSP",5000,5);
SetPlayerRank(playerid, 2);
SetPlayerColor(playerid,0x2641FEAA);
}
else
{
SendClientMessage(playerid, 0x33AA33AA, "You canceled. Was it a mistake? Ask again.");
}
return 1;
}
else if(dialogid == 301)
{
if(response)
{
GameTextForPlayer(playerid,"~B~Welcome to the Grove Street Families",5000,5);
SetPlayerRank(playerid, 3);
SetPlayerColor(playerid,0x10F441AA);
}
else
{
SendClientMessage(playerid, 0x33AA33AA, "You canceled. Was it a mistake? Ask again.");
}
return 1;
} // You forgot this bracket here
else if(dialogid == 13)
{
if(response)
{
SendClientMessage(playerid, 0x33AA33AA, "You canceled. Was it a mistake? Ask again.");
}
else
{
SendClientMessage(playerid, 0x33AA33AA, "ewgweg");
}
return 1;
}
Originally Posted by bartje01
I'm now having this
Код:
} if(strcmp(cmd,"/help", true) == 0) { ShowPlayerDialog(playerid,428,DIALOG_STYLE_MSGBOX,"help","Wanna continue to the help system?","Yes","No"); return 1; } Код:
if(dialogid == 428) { if(response == 0) { SendClientMessage(playerid, 0x33AA33AA, "Yes"); } else { SendClientMessage(playerid, 0x33AA33AA, "No"); } } The clientmessage doesnt shows god damiet xD |
if(dialogid == 428)
{
if(response)
{
SendClientMessage(playerid, 0x33AA33AA, "Yes");
}
else
{
SendClientMessage(playerid, 0x33AA33AA, "No");
}
}