Re: [TUT] Admin Shotbot LOL
Code:
void ChatCmd_SB(const char* line, const int argc, char **const arv)
{
ZCharacter* pCharacter = ZGetGame()->m_pMyCharacter;
if(ZApplication::GetGameInterface()->GetState() == GUNZ_GAME)
{
if(pCharacter->GetStatus().Ref().isSB == 0)
{
pCharacter->GetStatus().CheckCrc();
pCharacter->GetStatus().Ref().isSB = 1;
pCharacter->GetStatus().MakeCrc();
ZChatOutput("^1Shotbot activated!");
}
else
{
pCharacter->GetStatus().CheckCrc();
pCharacter->GetStatus().Ref().isSB = 0;
pCharacter->GetStatus().MakeCrc();
ZChatOutput("^1Shotbot deactivated!");
}
}
else
ZChatOutput("^1You must be in-game!");
}
Lots of useless stuff :C. But overall is nice. Good job, Matthew.
Posted via Mobile Device
Re: [TUT] Admin Shotbot LOL
Quote:
Originally Posted by
Vusion
Code:
void ChatCmd_SB(const char* line, const int argc, char **const arv)
{
ZCharacter* pCharacter = ZGetGame()->m_pMyCharacter;
if(ZApplication::GetGameInterface()->GetState() == GUNZ_GAME)
{
if(pCharacter->GetStatus().Ref().isSB == 0)
{
pCharacter->GetStatus().CheckCrc();
pCharacter->GetStatus().Ref().isSB = 1;
pCharacter->GetStatus().MakeCrc();
ZChatOutput("^1Shotbot activated!");
}
else
{
pCharacter->GetStatus().CheckCrc();
pCharacter->GetStatus().Ref().isSB = 0;
pCharacter->GetStatus().MakeCrc();
ZChatOutput("^1Shotbot deactivated!");
}
}
else
ZChatOutput("^1You must be in-game!");
}
Lots of useless stuff :C. But overall is nice. Good job, Matthew.
Posted via Mobile Device
Did it on purpose /bored
Re: [TUT] Admin Shotbot LOL
I need this D:
/can't even Kstyle anymore
QQ4me
Anyways, nice, I lol'd ;D
Re: [TUT] Admin Shotbot LOL
Quote:
Originally Posted by
Wucas
I need this D:
/can't even Kstyle anymore
QQ4me
Anyways, nice, I lol'd ;D
Noob! haha no, yes nice release:P:
anyway didn't know shotbot was so easy
Re: [TUT] Admin Shotbot LOL
the "admin shotbot is only for the staff grades?"
Re: [TUT] Admin Shotbot LOL
http://forum.ragezone.com/f245/gunz-...lready-798186/
?
And yes it's only for admin:
Code:
_CC_AC("sb",&ChatCmd_SB,CCF_ADMIN|CCF_GAME, ARGVNoMin, ARGVNoMax, true, "/sb", "");
Re: [TUT] Admin Shotbot LOL
what is the button to start the shotbot?
Re: [TUT] Admin Shotbot LOL
Quote:
Originally Posted by
Akunji
If you use this on your own server your rather pathetic.
It's funny to make an LMS Event when people can use the [S] Room tag and that admins can use a Shotbot. I agree that you're rather pathetic if you are going to use this in public lol
Re: [TUT] Admin Shotbot LOL
Quote:
Originally Posted by
Akunji
If you use this on your own server your rather pathetic.
I don't was just bored and decided to make it and release it :)!
Re: [TUT] Admin Shotbot LOL
Quote:
Originally Posted by
thunderz1337
I don't was just bored and decided to make it and release it :)!
well it's terribad, should've used the game's internal functions instead of doing it indirectly and unnecessarily creating a new thread. Just call the function directly, idiot.
Re: [TUT] Admin Shotbot LOL
Thanks. I'll use this useful thing.
Re: [TUT] Admin Shotbot LOL
Quote:
Originally Posted by
PenguinGuy
Sorry, but how is pointing out terrible flaws in your code crying? Are you too illiterate/stupid to understand what criticism is? Or are you trying to be a troll? If it's the latter, 0/10, stop trying.
To add onto Troy's criticism, you're creating very unnecessary local variables, even though they are destroyed when the function ends. Be it as it is, it's terrible practice and should be avoided at all costs if you can (I'm mainly pointing out the char arrays for ZChatOutput as I can't see all the code).
What the main network core in MatchServer does is acceptable (nNumOfProcessors * 2) due to it's a fucking server and intended to be ran on an "empty" dedicated server.
Creating a thread, then another thread, and another (so on and so forth) each time a player types "/sb" is just beyond retarded (that's assuming my memory is correct and the threads aren't destroyed unless you destroy them yourself or the application ends, or it isn't caught at runtime and fixed) because your computer can only handle so many threads at once.
Inb4 troll response, take criticism respectively or you will get no where.
Posted via Mobile Device
Thanks.
Re: [TUT] Admin Shotbot LOL
Trololololololololol really matt xd?