KEY lol
#1

why on this server they have KEY_R ? i mean in keys wiki is not over there... how can i create it ?

proof: http://imgur.com/a/sIAbg
Reply
#2

i think they might be using this plugin which allows to find keyboard numbers as long as there is no "R" key at samp wikis.
https://sampforum.blast.hk/showthread.php?tid=268671
Reply
#3

Say player1 has bound KEY_FIRE to R (just an example, don't use KEY_FIRE btw):
Код:
new string[144 + 1]; //Adjust size to fit the string, without to much leftover size
if(!IsPlayerInAnyVehicle(playerid)) {
    format(string, sizeof(string), "..., press ~k~~PED_SPRINT~ to listen to music.");
} else {
    format(string, sizeof(string), "..., press ~k~~VEHICLE_ACCELERATE~ to listen to music.");    
}
SendClientMessage(playerid, -1, string);
The message will display to player1 as: ..., press R to listen to music.

Say player2 has KEY_FIRE as LeftMouseButton.
The message will display to player2 as: ..., press LMB to listen to music.
Reply
#4

Quote:
Originally Posted by Freaksken
Посмотреть сообщение
Say player1 has bound KEY_FIRE to R (just an example, don't use KEY_FIRE btw):
Код:
new string[144 + 1]; //Adjust size to fit the string, without to much leftover size
if(!IsPlayerInAnyVehicle(playerid)) {
    format(string, sizeof(string), "..., press ~k~~PED_SPRINT~ to listen to music.");
} else {
    format(string, sizeof(string), "..., press ~k~~VEHICLE_ACCELERATE~ to listen to music.");    
}
SendClientMessage(playerid, -1, string);
The message will display to player1 as: ..., press R to listen to music.

Say player2 has KEY_FIRE as LeftMouseButton.
The message will display to player2 as: ..., press LMB to listen to music.
would it be the same if I worked with the key Id"numeric" instead of "KEy_X" ?
Reply
#5

is not working in any way ... i want the key R

"ThatFag" that plugin is only for window server..
Reply
#6

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
would it be the same if I worked with the key Id"numeric" instead of "KEy_X" ?
If you mean that you want to use the function-value instead of the function-macro: yes of course you can, but why would you? Using the macro is so much easier to read.
If that is not what you meant, try to explain it a bit more.

Quote:
Originally Posted by StR_MaRy
Посмотреть сообщение
is not working in any way ... i want the key R
You can not check for keys on your keyboard. You can only check for the key-functions that are used in GTA SA.
If you have the "sprinting function" as the left-shift key, then you can make SA-MP check if the "sprinting function" was used. You can not make SA-MP check if the left-shift key was used.

Either that server just has bad code like this:
Код:
format(string, sizeof(string), "..., press R to listen to music.");
or you have the function they use bound to R.
Reply
#7

so how they did it ? explain pls ? someone i pressed R and it worked .. is not just a simple message
Reply
#8

Quote:
Originally Posted by Freaksken
Посмотреть сообщение
Either that server just has bad code like this:
Код:
format(string, sizeof(string), "..., press R to listen to music.");
or you have the function they use bound to R.
Nah, R = radio key. OnPlayerKeyStateChange gets called when that key is presed, however I can't remember what bitmask is used, but you can easily find that by debugging OnPlayerKeyStateChange.
Reply
#9

Quote:
Originally Posted by Spmn
Посмотреть сообщение
Nah, R = radio key.
Really? Hmm never noticed.
Reply
#10

ok so no scripter from this site know how to solve this ... ohh
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)