Send a dcmd command when press key?Rep+
#1

Heey all,

How can i make this command:
Код:
dcmd_payticket(playerid,params);//the command dont use params
to a key?

Thanks Admigo
Reply
#2

Will this help when i am not using params?
Код:
if (newkeys & KEY_SPRINT && newkeys & KEY_SUBMISSION)
{
  	dcmd_payticket(playerid,IntToStr(playerid));
	return 1;
}
Reply
#3

Yes, I believe so if I am not wrong.
Reply
#4

This would be better

pawn Код:
if (newkeys & KEY_SPRINT && newkeys & KEY_SUBMISSION)
{
    dcmd_payticket(playerid,"");
    return 1;
}
Also, do you want both keys to be pressed or only one?
Reply
#5

In public "OnPlayerCommandText":
Код:
dcmd(payticket,9,cmdtext);
and in your mode:
Код:
dcmd_payticket(playerid,params[]) 
{ 
    #pragma unused params 
    return SendClientMessage(playerid,-1,"you have paid your ticket."); 
}
Reply
#6

Quote:
Originally Posted by Accord
Посмотреть сообщение
In public "OnPlayerCommandText":
Код:
dcmd(payticket,9,cmdtext);
and in your mode:
Код:
dcmd_payticket(playerid,params[]) 
{ 
    #pragma unused params 
    return SendClientMessage(playerid,-1,"you have paid your ticket."); 
}
Dude,i know how to make dcmd commands....
@MadeMan both buttons but i dont see any message of the command.
Reply
#7

So what is your question sir? how to make a payticket command?
Reply
#8

There is a difference:

pawn Код:
if (newkeys & KEY_SPRINT && newkeys & KEY_SUBMISSION)
means you are pressing KEY_SPRINT and KEY_SUBMISSION together
pawn Код:
if (newkeys & KEY_SPRINT || newkeys & KEY_SUBMISSION)
means you are pressing KEY_SPRINT or KEY_SUBMISSION only
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)