21.09.2010, 14:44
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
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
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