| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 155 online users. » 0 Member(s) | 151 Guest(s) Google, Bing, Yandex, DuckDuckGo
|
| Latest Threads |
Unban
Forum: Chat
Last Post: stryzo125
20 minutes ago
» Replies: 4
» Views: 793
|
[Announcement] Spawn - An...
Forum: Tech
Last Post: iAmir
Today, 12:22 AM
» Replies: 1
» Views: 241
|
Pedestrians
Forum: Plugins
Last Post: iAmir
Today, 12:18 AM
» Replies: 1
» Views: 245
|
Silly little render a did...
Forum: Art
Last Post: iAmir
Today, 12:07 AM
» Replies: 1
» Views: 1,262
|
Discord Server Unable to ...
Forum: Chat
Last Post: iAmir
Today, 12:06 AM
» Replies: 1
» Views: 452
|
It has been a while
Forum: Chat
Last Post: iAmir
Today, 12:04 AM
» Replies: 1
» Views: 458
|
GTA San Andreas - The mov...
Forum: Chat
Last Post: ricardofnl
Yesterday, 11:26 PM
» Replies: 1
» Views: 551
|
Kalcor is still outta the...
Forum: Chat
Last Post: ricardofnl
Yesterday, 11:14 PM
» Replies: 2
» Views: 277
|
[Tool] PawnPro v3.4.2 β D...
Forum: Programming
Last Post: NullSablex
Yesterday, 09:38 PM
» Replies: 0
» Views: 54
|
Help needed: Where to fin...
Forum: Questions and Suggestions
Last Post: doctorsalamii
Yesterday, 09:31 PM
» Replies: 0
» Views: 28
|
|
|
| SetObjectMaterial() weird |
|
Posted by: gokuta - 2021-03-09, 10:31 AM - Forum: Pawn Scripting
- Replies (8)
|
 |
okay, I use this:?
Code: new objectid = CreateObject(3174, 1345.0, -1400.0, 14.0, 0.0, 0.0, 0.0, 150.0);
SetObjectMaterial(objectid, 0, -1, "none", "none", 0xFFFFFFFF);
This line does almost nothing, it only removes vertex lightning. That's all. The problem is... draw distance suffers!!! I mean my object disappears quickly and abruptly at distance 150.0. First of all... no nice transitions, it disappears fast?and looks horrible.?Second of all... my personal draw distance settings are disregarded now.
Is it some undocumented?SetObjectMaterial flaw that cannot be fixed? How do I use?SetObjectMaterial without fucking up draw distance of my objects?
|
|
|
|
| Hooks Problem |
|
Posted by: Kodokushi - 2021-03-08, 09:55 PM - Forum: Pawn Scripting
- Replies (2)
|
 |
Hi
I'm having a problem where a callback is not called in the modules (I'm using y_hooks). Using hooks with native callbacks this doesn't happen.
Code: // GAMEMODE
forward OnPlayerChangeJob(playerid, pJob);
public OnPlayerChangeJob(playerid, pJob) {
}
OnPlayerChangeJob(playerid, pJob);
// MODULES
hook OnPlayerChangeJob(playerid, pJob) {
? ? SendClientMessage(playerid, -1, "CALLED!");
? ? return true;
}
|
|
|
|
MySQL Question |
|
Posted by: kalEd - 2021-03-08, 02:34 PM - Forum: Pawn Scripting
- Replies (4)
|
 |
What is the most efficient and optimized method to save data in the database?
For example this?:
Code: new gQuery[ 256?]; //at the beginning of the gamemode
//in a function=>
gQuery[ 0 ] = EOS;
mysql_format( handle, gQuery, sizeof gQuery, "INSERT INTO `logs` (`Player`, `IP`) VALUES ('%e', '%s')", getName( playerid ), getPlayerIp( playerid ) );
mysql_tquery( handle, gQuery, "", "" );
or this?:
Code: new Query[ 90 ];
mysql_format( handle, Query, sizeof Query, "INSERT INTO `logs` (`Player`, `IP`) VALUES ('%e', '%s')", getName( playerid ), getPlayerIp( playerid ) );
mysql_tquery( handle, Query, "", "" );
What exactly does gQuery[0] = EOS; mean? What's the difference?
|
|
|
|
Script performance testing |
|
Posted by: kalEd - 2021-03-08, 10:02 AM - Forum: Support
- Replies (5)
|
 |
How can I detect how fast a function is running using gettickcount??If anyone can give me an example, or if you know another method.
|
|
|
|
| samp-server-info-obtainer |
|
Posted by: KyroKun - 2021-03-07, 11:32 PM - Forum: Libraries
- Replies (3)
|
 |
https://github.com/kyro95/samp-server-info-obtainer
πΊοΈ samp-server-obtainer β A simple library made in typescript for obtaining your samp server info
Example:
Code: import sampServer from "./path";
async function doTest() {
const test = await sampServer.retriveInfo({
ip: "",
port: 7777
}, "i");
console.log(test);
}
doTest();
// Prints out an object which contains the samp server info submitted.
|
|
|
|
| Question about pawn compiler |
|
Posted by: robertocaribbean - 2021-03-07, 08:06 PM - Forum: Pawn Scripting
- Replies (5)
|
 |
Hi there,
I want to use spanish words in my gamemode, but the compiler throws error when try to compile.
Code: CMD:veh?culo(playerid, params[]) {
? SendClientMessage(playerid, -1, "test");
? return 1;
}
This throws an error: "Invalid function or declaration" in the line where "veh?culo" word is.
Also when I want to use SendClientMessage, there is no error at compiler level but the message look weird character, instead of the character I want.
Maybe the compiler doesn't support characters like " ? "?
Code: CMD:test(playerid, params[]) {
? SendClientMessage(playerid, -1, "veh?culo");
? return 1;
}
|
|
|
|
| Actor weapon |
|
Posted by: annety - 2021-03-07, 02:30 PM - Forum: Pawn Scripting
- Replies (11)
|
 |
Based on this actor:
Code: // 24-7
CreateDynamicActor(bizzid, 17, 142, -29.0206,-186.8182,1003.5469,1.6775);
With editdynamic object i found a formula to get the weapon position based on actor position?(to put the weapon in actor hands):
Code: ? ? // created [15:21:57] x[-29.020599] y[-186.818206] z[1003.546875] RotX[0] RotY[0] RotZ[0]
? ? new Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz;
? ? GetDynamicActorPos(actorid, x, y, z);
? ? // moved [15:23:45] x[-28.945550] y[-186.275421] z[1003.882324] rx[0.000000] ry[-3.300002] rz[98.899940]
? ? x = 1.0;
? ? x -= 0.924951;
? ? y = 0.542785;
? ? z = 0.335449;
? ? rx = 0.0;
? ? ry = -3.300002;
? ? rz = 98.899940;
? ? DestroyDynamicObject(ActorInfo[actorid][actorGun]);
? ? ActorInfo[actorid][actorGun] = CreateDynamicObject(GetGunObjectID(24), x, y, z, rx, ry, rz);
For this actor it become amazing:
![[Image: Tfc0wa7.png]](https://i.imgur.com/Tfc0wa7.png)
I did think that it gonna work with all other actores, but didn't:
Code: // pizza
CreateDynamicActor(bizzid, 5, 155, 374.7394,-117.2788,1001.4922,180.5908);
![[Image: igOe4f7.png]](https://i.imgur.com/igOe4f7.png)
Code: // alambra
CreateDynamicActor(bizzid, 17, 194, 501.6993,-20.4994,1000.6797,88.5219);
![[Image: rA9pALX.png]](https://i.imgur.com/rA9pALX.png)
Anybody more experienced could help me to make the weapon works on all actor like the first one (24/7)?
Would be an amazing feature to all servers do in some way put a weapon on actor hands based on his position...
(i know about npc, i want fix this way to put this weapons for actors)
|
|
|
|
|