pressing 2 - 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)
+--- Thread: pressing 2 (
/showthread.php?tid=381091)
pressing 2 +rep -
HardBoy - 28.09.2012
hey guys...
how to make when someone press 2 an command comes?
i have arrest command
i want when player presses 2 it arrests
PHP код:
command(arrest,playerid,params[])
{
return ArrestFunction(playerid,params);
}
thats the command
i want when i press 2 the command do auto
Re: pressing 2 -
HardBoy - 28.09.2012
helppp?
Re: pressing 2 -
RedJohn - 28.09.2012
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SUBMISSION) return ArrestFunction(playerid,params);
}
Re: pressing 2 -
HardBoy - 28.09.2012
error
C:\Users\semo\Desktop\files\Server\gamemodes\grab. pwn(3120) : error 017: undefined symbol "params"
Re: pressing 2 -
Gangster-rocks - 28.09.2012
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new params[];
if(newkeys & KEY_SUBMISSION) return ArrestFunction(playerid,params);
}
Re: pressing 2 -
HardBoy - 28.09.2012
Quote:
Originally Posted by Gangster-rocks
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { new params[]; if(newkeys & KEY_SUBMISSION) return ArrestFunction(playerid,params); }
|
3 errors now
C:\Users\semo\Desktop\files\Server\gamemodes\grab. pwn(3120) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\semo\Desktop\files\Server\gamemodes\grab. pwn(3120) : error 036: empty statement
C:\Users\semo\Desktop\files\Server\gamemodes\grab. pwn(3121) : error 017: undefined symbol "params"
Re: pressing 2 -
HardBoy - 28.09.2012
help?
Re: pressing 2 -
HardBoy - 28.09.2012
help pls i will give rep
Re: pressing 2 -
HyDrAtIc - 28.09.2012
First you can't rep people when you have less than 50 posts
Second show us your "public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)" callback
Re: pressing 2 -
HardBoy - 28.09.2012
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SUBMISSION)return ArrestFunction(playerid,params);
return 0;
}