anyone been messing around with chatGPT
its AI is crazy good for anything, i been messing with it to make batch scripts, translate text, write paragraphs, break down long walls of text to just summarize what its about
its basically a strait to the point google that you can add on the the results to add more code steps or correct a mistake etc.
So i haven't been on the forums for a good ... 6 years, but when i ran a active 1.6 server (30- 50 regular players over 3 years ever night PUGs and during the day funmaps and pub setting) good times.
i basically read through these forums looking at code to make 5v5 team lock plugins, a say /score counter when LO3, that displays simple text [CT-3]-[T-5]
and /rounds to print how many rounds are left, also would announce that its halftime and swap the numbers. this is all besides the point im tryin to make, But i ended up somehow making a plugins with little knowledge on the functions and syntaxs, (a lot of heisenbug type "medicines" were involved every weekend for 3 years. 5 out of 7 days it was GO GO GO time"
i did a lot of custom plugins by basically 3 years of tinkering and cutting. pasting code snippets. im trying to remember it all after 6 years, i think ill get lost if i tryed to even look at the code i did, i could barely grasp it at the time tweaking out i would get lost in sma files L:OL, (i was proud of the achievements)
I should post the sma files for ppl to to break down. only problem i ever had was a small memory leak after like 5 match's, the team lock plugin would bug out. but a quick "amx_cmd restart 1" would fix it. (I think that was the command)
I'm off topic
I told the AI do this:
Quote:
create a amxx plugin using pawn that enables voice chat to both team when spectating and after they die
|
Code:
#include <amxmodx>
#include <engine>
#include <csx>
new const g_szType[] = "type";
new const g_szTeam[] = "team";
new g_VoiceState[33];
public plugin_init()
{
register_plugin("Voice Chat for Spectators and Dead Players", "1.0", "Your Name");
register_event("DeathMsg", "OnDeath", "a");
register_event("HLTV", "OnSpectatorConnect", "a");
register_event("HLTV", "OnSpectatorDisconnect", "a");
register_event("TextMsg", "OnTextMessage", "a");
}
public OnDeath(id)
{
g_VoiceState[id] = 0;
}
public OnSpectatorConnect(id)
{
g_VoiceState[id] = 1;
}
public OnSpectatorDisconnect(id)
{
g_VoiceState[id] = 0;
}
public OnTextMessage(const id, const szType[], const szString[])
{
if (equal(szType, g_szType) && equal(szString, g_szTeam))
{
if (g_VoiceState[id] == 1)
{
new szTeam[8];
get_user_team(id, szTeam, charsmax(szTeam));
if (szTeam[0] == 'T')
set_user_team(id, "CT");
else if (szTeam[0] == 'C')
set_user_team(id, "T");
}
else if (g_VoiceState[id] == 0)
{
set_user_team(id, "SPECTATOR");
}
}
}
I then asked the AI:
Quote:
is this correct
else if (szTeam[0] == 'C')
or is it
else if (szTeam[0] == 'CT')
|
The AI said:
Code:
else if (szTeam[0] == 'CT')
I then told it to:
Quote:
redo whole script but use that correct syntax
|
Code:
#include <amxmodx>
#include <engine>
#include <csx>
new const g_szType[] = "type";
new const g_szTeam[] = "team";
new g_VoiceState[33];
public plugin_init()
{
register_plugin("Voice Chat for Spectators and Dead Players", "1.0", "Your Name");
register_event("DeathMsg", "OnDeath", "a");
register_event("HLTV", "OnSpectatorConnect", "a");
register_event("HLTV", "OnSpectatorDisconnect", "a");
register_event("TextMsg", "OnTextMessage", "a");
}
public OnDeath(id)
{
g_VoiceState[id] = 0;
}
public OnSpectatorConnect(id)
{
g_VoiceState[id] = 1;
}
public OnSpectatorDisconnect(id)
{
g_VoiceState[id] = 0;
}
public OnTextMessage(const id, const szType[], const szString[])
{
if (equal(szType, g_szType) && equal(szString, g_szTeam))
{
if (g_VoiceState[id] == 1)
{
new szTeam[8];
get_user_team(id, szTeam, charsmax(szTeam));
if (szTeam[0] == 'T')
set_user_team(id, "CT");
else if (szTeam[0] == 'CT')
set_user_team(id, "T");
}
else if (g_VoiceState[id] == 0)
{
set_user_team(id, "SPECTATOR");
}
}
}
Im not sure if the AI made mistake or if the code functions, but it looks right.
what can you guys think for the ai to do, i know it would be usful for simple questions on code snipits. any code not just PAwn