console?
#10

pawn Код:
new bool: Tazer[MAX_PLAYERS];
pawn Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
      if(streamid == CopSaleCP)
      {
        new string[256],string2[128];
        new playername[MAX_PLAYER_NAME];
            GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
            format(string2,sizeof string2,"Welcome Officer %s ! Anything for You ?",playername);
            format(string,sizeof(string),"Tazer\t\t\t\t\t\t\t\t\t\t\t\b$25000",playername);
            ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,string2,string,"Buy","Cancel");
        return 1;
      }
  return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 2 && response)
  {
     _:Tazer[playerid] = true;
     SendClientMessage(playerid,0xFFFFFFAA,"You can use now /tazer.");
  }
  return 1;
}
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
  if(!strcmp(cmdtext,"/tazer",true))
  {
    if(_:Tazer[playerid] == false) return 1;
    // rest of code
  }
}
Reply


Messages In This Thread
console? - by Lajko1 - 12.12.2009, 13:20
Re: console? - by SloProKiller - 12.12.2009, 13:59
Re: console? - by Lajko1 - 12.12.2009, 14:16
Re: console? - by saiberfun - 12.12.2009, 14:19
Re: console? - by Lajko1 - 12.12.2009, 16:02
Re: console? - by Lajko1 - 12.12.2009, 16:35
Re: console? - by MJ! - 12.12.2009, 16:50
Re: console? - by MJ! - 12.12.2009, 16:50
Re: console? - by Lajko1 - 12.12.2009, 17:04
Re: console? - by MJ! - 12.12.2009, 17:09

Forum Jump:


Users browsing this thread: 1 Guest(s)