help with this please
#1

Hello guys,i just tryed and i cant get how to make the /enter command to work by pressing F or ENTER ... so if any1 know or wanna help me please post ! i wannna F and ENTER or + buttons ... TY
Reply
#2

Put this underneath OnPlayerKeyStateChange()
pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK)
{
// Your code
}
Reply
#3

ty but what i type on Your code and how i put the + button ?
Reply
#4

This code will run whenever you press enter or F. But whatever you have in `/enter` under that.
Reply
#5

is giving me errors

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_JUMP)
{
"/enter"
}

error 030: compound statement not closed at the end of file (started at line 51246)

help plz?
Reply
#6

lol u cant just write /enter
U have to write ur code there.
E.g. a SetPlayerPos(); command for teleporting a player into another interior.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_JUMP)
{
SetPlayerPos(playerid,x,y,z);
SetPlayerInterior(playerid,YOUR_ID_HERE);
SendClientMessage(playerid,COLOUR,"You've been teleported into a building using the JumpKey");
}
return 1;
}
Just put the code u have in the /enter command into this function
Reply
#7

man i wanna do for the SPACE key the /vehctrl menu from Yoshi's script i must make the /vehctrl instead coords !
Reply
#8

this code i gave u is just an example!
Just look up the name of the Button u wanna use in the wiki and paste the code that is used under OnPlayerCommandText for /vehctrl (in ur script) into the code ive posted.
Still im not 100% sure what u want
Reply
#9

this i want tnx a lot 10x tnx
Reply
#10

errors

C:\Documents and Settings\Admin\Desktop\aa\pawno\include\streamer.i nc(393) : warning 201: redefinition of constant/macro (symbol "OnPlayerEnterRaceCheckpoint")
C:\Documents and Settings\Admin\Desktop\aa\gamemodes\larp.pwn(51248 ) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Admin\Desktop\aa\gamemodes\larp.pwn(51248 ) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Admin\Desktop\aa\gamemodes\larp.pwn(51249 -- 51250) : warning 215: expression has no effect
C:\Documents and Settings\Admin\Desktop\aa\gamemodes\larp.pwn(51250 ) : error 001: expected token: "do", but found "return"
C:\Documents and Settings\Admin\Desktop\aa\gamemodes\larp.pwn(51253 ) : error 030: compound statement not closed at the end of file (started at line 51246)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.



public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_JUMP)
{
OnPlayerCommandText for /vehctrl
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)