pressing 2
#1

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

helppp?
Reply
#3

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_SUBMISSION) return ArrestFunction(playerid,params);
}
Reply
#4

error

C:\Users\semo\Desktop\files\Server\gamemodes\grab. pwn(3120) : error 017: undefined symbol "params"
Reply
#5

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
     new params[];
     if(newkeys & KEY_SUBMISSION) return ArrestFunction(playerid,params);
}
Reply
#6

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

help?
Reply
#8

help pls i will give rep
Reply
#9

First you can't rep people when you have less than 50 posts

Second show us your "public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)" callback
Reply
#10

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SUBMISSION)return ArrestFunction(playerid,params);
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)