09.12.2017, 21:21
No i wróciłem xD Dzisiaj w końcu mam trochę czasu to się wziąłem za to i chcę dodać do gamemodes......client-scripts/main.nut coś takiego:
// Client
enum packId {
packetLP,
};
addEventHandler("onPacket", function(pid, parms, packet) {
local id = packet
if(id == packId.packetLP) {
setLearnPoints(20);
}
});
A po stronie server-scripts takie ,,cuś,, xd :
// Server
enum packId {
packetLP,
};
function setLearnPoints(pid, params) {
local packet = Packet();
if(packet) {
packet.setLearnPoints(packId.packetLP);
packet.send(pid, RELIABLE_ORDERED);
}
};
I takie pytanie,czy Ja wgl idę w dobrą stronę?
// Client
enum packId {
packetLP,
};
addEventHandler("onPacket", function(pid, parms, packet) {
local id = packet
if(id == packId.packetLP) {
setLearnPoints(20);
}
});
A po stronie server-scripts takie ,,cuś,, xd :
// Server
enum packId {
packetLP,
};
function setLearnPoints(pid, params) {
local packet = Packet();
if(packet) {
packet.setLearnPoints(packId.packetLP);
packet.send(pid, RELIABLE_ORDERED);
}
};
I takie pytanie,czy Ja wgl idę w dobrą stronę?
