alert - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: alert (
/showthread.php?tid=178301)
alert -
iJumbo - 21.09.2010
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
Re: alert -
Rachael - 21.09.2010
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