Need Help with Ignoring Rules
#1

Hey i want when i ignore the rules or player ignore it
there would be a message should sent to all that saying
[SERVER]:Playername Has Been Kick Reason : Ignoring Rules
I try sendmessagetoall on dialogresponse but it crash the game

Heres The Code

OnPlayerCommand

pawn Код:
if(strcmp("/changemycolour", cmdtext, true, 10) == 0)
 {
     if(InSpawn[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You can't use this command while on class selection");
     if(GetPVarInt(playerid, "InDm") == 1) return SendClientMessage(playerid,COLOR_RED, "You cant use any command While Your in DM");
     else
     {
     ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Color Name Changer", "Purple\nYellow\nRed\nLightblue\nOrange\nGreen\nIndigo\nPink\nBlack", "Select", "Cancel");
     }
     return 1;
 }
OnDialogResponse

pawn Код:
if(dialogid == 2)
 {
    if(response == 1)
    {
    if(GetPVarInt(playerid,"RulesAccepted")!=1)
    {
         SetPVarInt(playerid,"RulesAccepted",1);
         SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
         GivePlayerMoney(playerid, 50000);
         SendClientMessage(playerid, COLOR_GREEN, "You Accept The Rules You Recieve $500000 + 5 Score Points");
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "You Already Accepted The Rules");
    }
      }
      else
      {
          SendClientMessage(playerid, COLOR_RED, "You Ignore The Rules");
          SendClientMessage(playerid, COLOR_RED, "You Have Been Kicked!, Reason : Ignoring The Rules");
      Kick(playerid);
      }
      return 1;
 }
Hope you help me
Reply


Messages In This Thread
Need Help with Ignoring Rules - by lyrics - 14.08.2011, 04:31
Re: Need Help with Ignoring Rules - by Kitten - 14.08.2011, 04:35
Re: Need Help with Ignoring Rules - by lyrics - 14.08.2011, 04:38

Forum Jump:


Users browsing this thread: 2 Guest(s)