Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Xmair
1
General Discussion / Re: Linux server files?
« on September 24th, 11:43 PM »
The latest hashing plugin had some issues for me, it fixed when I used an older build.

Side tip: replace vc-mp.org with thijn.ovh in dead links, Thijn has backed up most if not all of the official links.
2
Community Plugins / Re: create bots with this plugin
« on September 12th, 06:48 PM »
Quote from MEGAMIND on September 12th, 05:18 PM
i tried puttin the playfile function in onscriptload but its doesnt work until i type /mega to play it :P
Code: [Select]
-847 function onPlayingCompleted( recordedFileName, actor id )
-848 {
-849 PlayFile(MEGAMIND, 1); <---- HERE
-850 }
MEGAMIND isn't defined as a variable or constant anywhere, use "MEGAMIND" (string)
3
Script and Content Requests / Re: Socket Bad Request
« on September 1st, 10:28 AM »
Try using the HTTP Requests plugin by Luckshya.

Code: [Select]
local request = SqHTTP.GetRequest();
request.setURL("www.example.com");
request.setTag("myRequest");
request.sendGet();

function HTTP_OnResponse(tag, url, statusCode, response) {
switch(tag) {
case "myRequest": {
if (statusCode == 200) { // OK
print(response);
}
else { // Error
print(statusCode);
}
}
break;
}
}

Or if you want to stick to the official sockets plugin:
Code: [Select]
local sock = null;
local sockAddress = "www.example.com";

function setupSocket() {
sock = NewSocket("onSocketDataReceive");
sock.SetNewConnFunc("onSocketConnect");
sock.Connect(sockAddress, 80);
print(format("Connecting to %s...", sockAddress));
}

function onSocketDataReceive(data) {
print("Received data:");
print(data);
}

function onSocketConnect() {
print("Connection successful, sending data");

sock.Send("GET / HTTP/1.1\r\n");
sock.Send("Accept: */*\r\n");
sock.Send(format("Host: %s\r\n", sockAddress));
sock.Send("\r\n");
}

setupSocket();

Basically what you were missing was a "\r\n" in the end.
4
Script and Content Requests / Re: Socket Bad Request
« on August 31st, 02:36 PM »
What's `acikka`? As far as I know, it's not an accept method. Give this a read: https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values

TLDR:
Code: [Select]
Accept: */*
5
Script and Content Requests / Re: hidemapobject problem
« on August 12th, 07:20 PM »
If I remember correctly, some objects don't hide for some reason (vcmp bug, don't know if it still exists) but you can give this a try:
Code: [Select]
RawHideMapObject(1815, -637, 834, 12)
6
Tutorials / Re: vehicle.Damage Complete Information
« on August 6th, 09:22 AM »
Or you could just use vehicle.SetPartStatus?
7
Servers / [0.4] Re: Vice City Cops & Robbers
« on July 31st, 09:05 PM »
Eid Mubarak! May Allah flood your life with happiness, prosperity and good luck!

Credits: Roystang.

8
Support / Re: Trying to set 'class' error in Client Side
« on July 23rd, 06:05 AM »
Just an off topic comment, your code can be reduced to just this:
Code: [Select]
::IsLocalPlayerSpectating <- false;

::IsLocalPlayerSpectating = stream.ReadInt() == 1;
Not sure if it would work due to the environment being fucked in client side code.
9
Support / Re: Occasional server crash
« on July 23rd, 06:01 AM »
From what I have experienced, deleting or stopping timers cause crashes.
10
Off-Topic General / [Unofficial] Re: VCMP Scripters - Discord
« on July 19th, 01:09 PM »
A discord server for inexperienced coders has been created. https://discord.gg/GnM9GNr
11
Map Showroom / Re: Some places from Shine o’Vice
« on July 19th, 06:30 AM »
Nice, that reminds me of the little island near the golf club we converted from Shine'o'Vice for VCCNR, however it was never added due to the HideMapObject function being bugged.
12
Off-Topic General / Re: Need Scripter.
« on July 14th, 07:21 AM »
Quote from KadirYigit on July 13th, 09:56 PM
MessagePlayer("[#ffffff]>INFO: REMEMBER! You will not earn nothing. maybe God's respect. Dont forget,God's Respect is everything you need...   ",player);
13
Support / Re: bug my server.
« on July 6th, 08:29 PM »
Quote from Eva on July 6th, 07:40 PM
Quote from Xmair on July 6th, 04:40 PM
Quote from Eva on July 6th, 02:14 PM
Quote from habi on July 6th, 12:36 PM
Failed to load model xx for vehicle 296.

I don't know. Did you checked vehicle with id 296. Vehicle id starts with 1 I think.
The problem is some people cant connect to that server, also i cant exept if i connect trough vpn
and its only with a few people...
There's your answer.
i dont see it, as its not with all players also players that dont use a vpn can join there exept a few can't. question is whats the cause of it.

I noticed a few things when i connect with my isp i am somehow connected (i can see the chat go) (in masterlist i see myself as connected) but in f5 im the only and sais Unknown server. i cant chat myself. Also it doesnt create the server storefolder.

Now i connect with vpn and i can join with no problem.

oh and when i put the servers files manualy in appdata i still cant connect with normal isp
You're saying the answer yourself again and again, it's either your ISP blocking the IP or it's the server's firewall.
14
Support / Re: bug my server.
« on July 6th, 04:40 PM »
Quote from Eva on July 6th, 02:14 PM
Quote from habi on July 6th, 12:36 PM
Failed to load model xx for vehicle 296.

I don't know. Did you checked vehicle with id 296. Vehicle id starts with 1 I think.
The problem is some people cant connect to that server, also i cant exept if i connect trough vpn
and its only with a few people...
There's your answer.
15
Client Scripting / [Release] XAnimations - A basic approach with animations
« on June 12th, 04:58 PM »
XAnimations



I have been working with client side a lot lately and had some spare time so I decided to make a basic library for animations. This library serves more as a template to create your own animations than as an actual library due to it being really compact.


Code and Examples


All the examples as well as the code is available at the GitHub repository (note that GitHub messed up the indentation a bit, it should look fine after downloading/cloning it).


Credits