#1

how i can make an alert before the command ? like a player type /buycar and enter then server say remember you spend 500000 for this command ! then player have 2 make it again
Reply
#2

using zcmd
pawn Код:
CMD:buycar(playerid,params[])
{
     if(isnull(params))
     {
          SendClientMessage(playerid,DEFINED_COLOR,"Buying a car will cost $500,000");
          return 1;
     }
     new cost = strval(params);

.... etc
using OnPlayerCommandText
pawn Код:
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd,"buycar",true))
{
     tmp = strtok(cmdtext, idx);
     if(!strlen(tmp))
     {
          SendClientMessage(playerid,DEFINED_COLOR,"buying a car will cost $500,000");
          return 1;
      }
      new cost = strval(tmp);
}
..... etc
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)