13.07.2010, 10:29
What do you mean? u want telewarn?
This:
This:
Код:
//Top of on you'r script new DMZone[MAX_PLAYERS]; #define TELEWARN 1999 //onplayercommandtext public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/mycommand", true) == 0) { if(DMZone[playerid] == 1) return ShowPlayerDialog(playerid,TELEWARN,DIALOG_STYLE_MSGBOX,"Error:","Teleporting Error!\n\n-Sorry But you can't Teleport to another area while in a dm. Type /kill to leave the DM.","Kill Me!","Cancel"); //something here return 1; } if(strcmp(cmdtext, "/kill", true) == 0) { DMZone[playerid] = 0; SetPlayerHealth(playerid,0); ResetPlayerWeapons(playerid); return 1; } if(strcmp(cmdtext, "/leavedm", true) == 0) { DMZone[playerid] = 0; SetPlayerHealth(playerid,0); ResetPlayerWeapons(playerid); return 1; } return 0; } //ondialogresponse public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if (dialogid == TELEWARN) { if(response == 1) { SetPlayerHealth(playerid,0); DMZone[playerid] = 0; } return 1; } return 0; }