/accept *something*
#1

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
Reply
#2

Quote:
Originally Posted by Naruto4
i get a error.
What error exactly?
Reply
#3

Ahh not a pawno error.In Game error that this command doesnt exist.
Reply
#4

nah man.I have about 20 dcmd commands and they all work exept this one.
The lenght is good.
Reply
#5

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
Reply
#6

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)