/accept *something* - 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: /accept *something* (
/showthread.php?tid=118534)
/accept *something* -
Naruto4 - 03.01.2010
i tried but failed.Code:
Код:
dcmd_accept(playerid, params[])
{
new toaccept;
new tstring[64];
new price = ticket[playerid];
if(AccountInfo[playerid][Faction] == 1)
{
if(sscanf(params,"s",toaccept)) return SCM(playerid, WHITE, "Usage: /accept [name]");SCM(playerid, WHITE, "Names: Ticket, ");
{
if(strcmp(params,"ticket",true) == 0)
{
GivePlayerMoney(playerid,-price);
format(tstring,64,"*LSPD* %s has paid a ticket with Price:%d",PlayerName(playerid),price);
SendFactionMessage(BLUE,tstring,1);
ticket[playerid] = 0;
}
}
}
return 1;
}
I wanted like /accept ticket or service or invite or money or w/e.
With a text in one command.
thanks.And this doesnt work.I get unknown error i think. IG
Re: /accept *something* -
Correlli - 03.01.2010
Quote:
Originally Posted by Naruto4
i get a error.
|
What error exactly?
Re: /accept *something* -
Naruto4 - 03.01.2010
Ahh not a pawno error.In Game error that this command doesnt exist.
Re: /accept *something* -
Naruto4 - 03.01.2010
nah man.I have about 20 dcmd commands and they all work exept this one.
The lenght is good.
Re: /accept *something* -
RyDeR` - 03.01.2010
use params of dcmd in stead of scanf in this cmd. if(!strln(params)) return sendmsg// msg then new some = strval(params); this post is with wap btw
Re: /accept *something* -
MadeMan - 03.01.2010
pawn Код:
dcmd_accept(playerid, params[])
{
new toaccept[32]; // this must be string
new tstring[64];
new price = ticket[playerid];
if(AccountInfo[playerid][Faction] == 1)
{
if(sscanf(params,"s",toaccept))
{
SCM(playerid, WHITE, "Usage: /accept [name]");
SCM(playerid, WHITE, "Names: Ticket, ");
return 1;
}
if(strcmp(toaccept,"ticket",true) == 0)
{
GivePlayerMoney(playerid,-price);
format(tstring,64,"*LSPD* %s has paid a ticket with Price:%d",PlayerName(playerid),price);
SendFactionMessage(BLUE,tstring,1);
ticket[playerid] = 0;
}
}
return 1;
}