| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 483 online users. » 0 Member(s) | 480 Guest(s) Bing, Baidu, Google
|
|
|
| samp voice frequency |
|
Posted by: hiwyn - 2022-05-18, 02:53 PM - Forum: Pawn Scripting
- Replies (2)
|
 |
I tried but fail to put radio frequencies on samp voice...
2 problems:
1- you can hear and talk to everyone in any frequency, i mean you are in 3000, you can talk to people on 5000
2- server crashes a while after people use this
What i'm doing wrong?
global
Code: #define MAX_RADIOS 9999
forward ConnectRadioVoice(playerid);
forward DisconnectRadioVoice(playerid);
new SV_GSTREAM:StreamFreq[MAX_RADIOS] = SV_NULL;
new players_in_radiofrequency[MAX_RADIOS];
OnPlayerActivationKeyPress
Code: // radio voice
if(radio_frequency[playerid] == 0) {
SvAttachSpeakerToStream(StreamFreq[radio_frequency[playerid]], playerid);
}
// voice local
else {
SvAttachSpeakerToStream(lstream[playerid], playerid);
}
OnPlayerActivationKeyRelease
Code: // Detach the player from the local stream if the 'B' key is released
if (keyid == 0x42 && lstream[playerid]) {
SvDetachSpeakerFromStream(lstream[playerid], playerid);
}
// Detach the player from the local stream if the 'B' key is released
if (keyid == 0x42 && StreamFreq[radio_frequency[playerid]]) {
SvDetachSpeakerFromStream(StreamFreq[radio_frequency[playerid]], playerid);
}
functions from command
Code: public ConnectRadioVoice(playerid) {
new rfid = radio_frequency[playerid];
if(StreamFreq[rfid] == SV_NULL)
{
new string[128];
format(string, sizeof(string), "Radio %i", rfid);
StreamFreq[rfid] = SvCreateGStream(0xFF00FFFF, string);
SvAttachListenerToStream(StreamFreq[rfid], playerid);
}
else
{
SvAttachListenerToStream(StreamFreq[rfid], playerid);
}
players_in_radiofrequency[rfid] = 1;
return 1;
}
public DisconnectRadioVoice(playerid) {
new rfid = radio_frequency[playerid];
players_in_radiofrequency[rfid] -= 1;
if(players_in_radiofrequency[rfid] <= 0) {
StreamFreq[rfid] = SV_NULL;
}
return 1;
}
command
Code: CMD:radio(playerid, params[]) {
new frequency_id;
if(sscanf(params,"i", frequency_id)) return SendClientMessage(playerid, -1, "Use: /testid [id]");
if(frequency_id > MAX_RADIOS || frequency_id < 1) return SendClientMessage(playerid, -1, "O numero deve ser entre 1 e MAX_RADIOS");
radio_frequency[playerid] = frequency_id;
if(frequency_id == 0) DisconnectRadioVoice(playerid);
else ConnectRadioVoice(playerid);
return 1;
}
|
|
|
|
| insert line as much as the amount. |
|
Posted by: Axitz - 2022-05-11, 12:28 PM - Forum: Pawn Scripting
- Replies (1)
|
 |
hi,
for now, this line is inserting only 1 by 1 since i used People; but I want to multiply it by the amount.
so when i put like /test 10
it will create 10 lines.
example code as below.
Code: COMMAND:test(playerid, params[])
{
new? iAmount;
if( sscanf ( params, "d", iAmount)) return SendClientMessage(playerid,-1, "[amount]");
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
People;
Pool=LOTTERY_PRICE;
dini_IntSet("lottery.ini", "money", Pool);
GivePlayerMoney(playerid, -LOTTERY_PRICE);
new string[128];
format(string, sizeof(string), "%d", People);
dini_Set("lottery.ini", string, PlayerName);
return 1;
}
|
|
|
|
| How Setting Server Console to Hidden login log connection cookie? |
|
Posted by: PutuSuhartawan - 2022-05-11, 11:12 AM - Forum: Pawn Scripting
- No Replies
|
 |
![[Image: unknown.png]](https://media.discordapp.net/attachments/972133317199663104/972134081884201110/unknown.png)
And abaout the plugin setting. How to hidden plugin log too?
[21:28:29] : [sv:dbg:network:connect] : player (32) assigned key (a1af9067de8251a2)
[21:28:29] : [sv:dbg:network:receive] : player (32) identified (port:48538)
[21:28:33] : [sv:dbg:network:connect] : connecting player (3) with address (180.249.82.178) ...
[21:28:33] : [sv:dbg:network:connect] : player (3) assigned key (b252f9b4e9be3c94)
[21:28:33] : [sv:dbg:network:receive] : player (3) identified (port:41177)
[21:28:40] : [sv:dbg:network:connect] : disconnecting player (36) ...
[21:28:41] : [sv:dbg:network:connect] : disconnecting player (25) ...
[21:28:49] : [sv:dbg:network:connect] : disconnecting player (21) ...
[21:28:51] : [sv:dbg:network:connect] : connecting player (36) with address (114.5.215.231) ...
[21:28:51] : [sv:dbg:network:connect] : player (36) assigned key (e7d70572fdfac585)
[21:28:51] : [sv:dbg:network:receive] : player (36) identified (port:64510)
[21:28:53] : [sv:dbg:network:connect] : disconnecting player (14) ...
[21:28:56] : [sv:dbg:network:connect] : connecting player (14) with address (128.14.65.219) ...
[21:28:56] : [sv:dbg:network:connect] : player (14) assigned key (db410e80fef2bf7d)
[21:29:03] : [sv:dbg:network:connect] : disconnecting player (72) ...
[21:29:03] : [sv:dbg:network:connect] : disconnecting player (3) ...
|
|
|
|
| Increase chance? |
|
Posted by: Axitz - 2022-05-01, 05:46 PM - Forum: Pawn Scripting
- Replies (1)
|
 |
Hi,
How do I make/get people with a high amount of something have high amount of winning?
Any short simple code, I'd appreciated it.
|
|
|
|
Object Rotation/Functions |
|
Posted by: Salik_Davince - 2022-04-24, 08:10 AM - Forum: Pawn Scripting
- No Replies
|
 |
Hi, I know that the project is practically not supported, but I would like to ask how to implement the rotation of an object and position relative to another object, i.e. group objects, I know that 3DTryg includes the following functions, but I am not strong in trigonometry: (yandex translator) -
* GetRotationFor2Point2D(Float:x,Float:y,Float:tx,Float:ty,&Float:rz);
* GetRotationFor2Point3D(Float:x,Float:y,Float:z,Float:tx,Float:ty,Float:tz,&Float:rx,&Float:rz);
* ShiftVectorToRotation(Float:vx,Float:vy,Float:vz,&Float:rx,&Float:rz);
* ShiftRotationToVector(Float:rx,Float:rz,&Float:vx,&Float:vy,&Float:vz);
* ShiftVectorRotation(Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz,&Float:tx,&Float:ty,&Float:tz);
* Item::GetRotationQuat(elementid,Item3D_Type:element_type,&Float:qw,&Float:qx,&Float:qy,&Float:qz);
* //Nero_3D Rotations Functions:
* Tryg3D::GetRotationMatrixEuler(Float:matrix[][],Float:rx,Float:ry,Float:rz,T3D:eulermode:mode=T3D:euler_default);
* Tryg3D::MatrixRotate(Float:matrix[][],Float:oX,Float:oY,Float:oZ,&Float:x,&Float:y,&Float:z);
* Tryg3D::QuatRotate(Float:qw,Float:qx,Float:qy,Float:qz,Float:oX,Float:oY,Float:oZ,&Float:tx,&Float:ty,&Float:tz);
* Tryg3D::GetQuatFromEuler(Float:rx,Float:ry,Float:rz,&Float:qw,&Float:qx,&Float:qy,&Float:qz,T3D:eulermode:mode=T3D:euler_default);
* Tryg3D::EulerRotate(Float:rX,Float:rY,Float:rZ,Float:oX,Float:oY,Float:oZ,&Float:tx,&Float:ty,&Float:tz,T3D:eulermode:mode=T3D:euler_default);
==============================
You can even show and cite functions without using 3DTryg, but
==============================
And the second question in conclusion is how to set the angle of the player towards the object and set the angle (rotation) of the object towards the player, thank you for your help.!
|
|
|
|
| Why the accents are not working? |
|
Posted by: hiwyn - 2022-04-23, 01:51 PM - Forum: Support
- Replies (1)
|
 |
Why the accents are not working?
I mean, if i do:
SendClientMessage(i, COLOR_LIGHTRED, "O servidor ser?
Ingame it looks like:
![[Image: Screenshot-from-2022-04-23-10-49-10.png]](https://i.ibb.co/TmxHLCW/Screenshot-from-2022-04-23-10-49-10.png)
And all other accents like ?, ?, ? looks like this /\
---
I'm compiling it on linux with this: https://github.com/pawn-lang/compiler/releases
And with this .vscode/tasks.json:
Code: {
? // See https://go.microsoft.com/fwlink/?LinkId=733558
? // for the documentation about the tasks.json format
? "version": "2.0.0",
? "tasks": [
? ? {
? ? ? "label": "build",
? ? ? "type": "shell",
? ? ? "command": "/usr/bin/pawncc",
? ? ? "args": [
? ? ? ? "${file}",
? ? ? ? "\"-;\"",
? ? ? ? "\"-(\"",
? ? ? ? "-i\"/home/hiwyn/Documents/sampserver/include/\""
? ? ? ],
? ? ? "group": {
? ? ? ? "kind": "build",
? ? ? ? "isDefault": true
? ? ? },
? ? ? "isBackground": false,
? ? ? "presentation": {
? ? ? ? "reveal": "silent",
? ? ? ? "clear": false,
? ? ? ? "panel": "dedicated"
? ? ? },
? ? ? "problemMatcher": [
? ? ? ? {
? ? ? ? ? "base": "$pawncc",
? ? ? ? ? "fileLocation": "relative"
? ? ? ? }
? ? ? ]
? ? }
? ]
}
What else should i do?
|
|
|
|
| My server is not showing on internet tab |
|
Posted by: hiwyn - 2022-04-23, 01:36 PM - Forum: Support
- Replies (1)
|
 |
Just change on server.cfg
Isn't enough?
what should i do to it starts to show?
hosted tab is mouth paid, right?
btw where is the official site to buy it?
but internet tab is free, right?
|
|
|
|
| make vscode compiler rewrite actual file |
|
Posted by: hiwyn - 2022-04-23, 01:25 PM - Forum: Support
- Replies (1)
|
 |
everytime i press F5 to compile a filterscript or a gamemode
it creates the .amx, but creates where i open the vscode
i mean, if i did:
cd sampserver && code .
if i open a file MISSIONS.pwn in sampserver/gamemodes
it will generate the amx in /home/sampserver instead of /home/sampserver/gamemodes
there is a way to instead of generate the amx there it get the file path (.pwn i'm editing) and creates the amx there rewriting the actual?
its boring, every time i edit a lib or a gm or a filterscript i got to move the amx after finish
I'm compiling it on linux with this: https://github.com/pawn-lang/compiler/releases
And with this .vscode/tasks.json:
Code: {
? // See https://go.microsoft.com/fwlink/?LinkId=733558
? // for the documentation about the tasks.json format
? "version": "2.0.0",
? "tasks": [
? ? {
? ? ? "label": "build",
? ? ? "type": "shell",
? ? ? "command": "/usr/bin/pawncc",
? ? ? "args": [
? ? ? ? "${file}",
? ? ? ? "\"-;\"",
? ? ? ? "\"-(\"",
? ? ? ? "-i\"/home/hiwyn/Documents/sampserver/include/\""
? ? ? ],
? ? ? "group": {
? ? ? ? "kind": "build",
? ? ? ? "isDefault": true
? ? ? },
? ? ? "isBackground": false,
? ? ? "presentation": {
? ? ? ? "reveal": "silent",
? ? ? ? "clear": false,
? ? ? ? "panel": "dedicated"
? ? ? },
? ? ? "problemMatcher": [
? ? ? ? {
? ? ? ? ? "base": "$pawncc",
? ? ? ? ? "fileLocation": "relative"
? ? ? ? }
? ? ? ]
? ? }
? ]
}
|
|
|
|
|