ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 1917

[HELP] Listing modders

by MikeLento - 10-29-2018 - 11:20 PM
#1
Code:
void Modderlist()

{
char* modtemp = new char[255];

float pos = 0.1125;
int i = 0;

for (i = 0; i < 18; i++)

{

if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(i)) {
strcpy(modtemp, PLAYER::GET_PLAYER_NAME(i));

if (PLAYER::GET_PLAYER_MAX_ARMOUR(i) == 777)
strcat(modtemp, " [~r~LegacyC~w~]");
if (PLAYER::GET_PLAYER_MAX_ARMOUR(i) == 571)
strcat(modtemp, " [~y~SRB 1.7~w~]");


}
snprintf(modtemp, sizeof(modtemp), "Modding:", PLAYER::GET_PLAYER_NAME(i));
drawText2(modtemp, 6, 0.07f, (pos += 0.025f), 0.5, 0.5, 255, 255, 255, 0, 0);
}

}

Please help, when it's executed it doesn't draw the text. basically does nothing
Reply
#2
Use Mine. Works Perfectly. lol.


if (DetectModders)
{
int index = 0;
for (int i = 0; i < 18; i++) {
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(i)) {
char* name = PLAYER::GET_PLAYER_NAME(i);
if (PLAYER::GET_PLAYER_MAX_ARMOUR(i) == 777) {
char buf[100];
snprintf(buf, sizeof(buf), "~r~Modder~w~ ~b~%s ~r~Legacy C", name);
drawText(buf, 4, 0.07f, 0.0299406f + (index * 0.025), 0.52f, 0.57f, 255, 255, 255, 200, 0);
index++;
}
if (PLAYER::GET_PLAYER_MAX_ARMOUR(i) == 101) {
char buf[100];
snprintf(buf, sizeof(buf), "~r~Modder~w~ ~b~%s ~r~Legacy P", name);
drawText(buf, 4, 0.07f, 0.0299406f + (index * 0.025), 0.52f, 0.57f, 255, 255, 255, 200, 0);
index++;
}

Hope This helps.
2021 Best Be Better Then 2020
Reply
#3
(10-30-2018 - 07:00 AM)trinity7 Wrote: Use Mine. Works Perfectly. lol.


if (DetectModders)
{
int index = 0;
for (int i = 0; i < 18; i++) {
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(i)) {
char* name = PLAYER::GET_PLAYER_NAME(i);
if (PLAYER::GET_PLAYER_MAX_ARMOUR(i) == 777) {
char buf[100];
snprintf(buf, sizeof(buf), "~r~Modder~w~ ~b~%s ~r~Legacy C", name);
drawText(buf, 4, 0.07f, 0.0299406f + (index * 0.025), 0.52f, 0.57f, 255, 255, 255, 200, 0);
index++;
}
if (PLAYER::GET_PLAYER_MAX_ARMOUR(i) == 101) {
char buf[100];
snprintf(buf, sizeof(buf), "~r~Modder~w~ ~b~%s ~r~Legacy P", name);
drawText(buf, 4, 0.07f, 0.0299406f + (index * 0.025), 0.52f, 0.57f, 255, 255, 255, 200, 0);
index++;
}

Hope This helps.
Thank you bro, you're literally a life saver!  Rockon Smile
yw for the 4 rep :)
Reply
#4
(10-30-2018 - 12:22 PM)MikeLento Wrote:
(10-30-2018 - 07:00 AM)trinity7 Wrote: Use Mine. Works Perfectly. lol.


if (DetectModders)
{
int index = 0;
for (int i = 0; i < 18; i++) {
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(i)) {
char* name = PLAYER::GET_PLAYER_NAME(i);
if (PLAYER::GET_PLAYER_MAX_ARMOUR(i) == 777) {
char buf[100];
snprintf(buf, sizeof(buf), "~r~Modder~w~ ~b~%s ~r~Legacy C", name);
drawText(buf, 4, 0.07f, 0.0299406f + (index * 0.025), 0.52f, 0.57f, 255, 255, 255, 200, 0);
index++;
}
if (PLAYER::GET_PLAYER_MAX_ARMOUR(i) == 101) {
char buf[100];
snprintf(buf, sizeof(buf), "~r~Modder~w~ ~b~%s ~r~Legacy P", name);
drawText(buf, 4, 0.07f, 0.0299406f + (index * 0.025), 0.52f, 0.57f, 255, 255, 255, 200, 0);
index++;
}

Hope This helps.
Thank you bro, you're literally a life saver!  Rockon Smile
yw for the 4 rep :)

Anytime Bro. thanks for the RP too. i might post some more helpful sttuff later
2021 Best Be Better Then 2020
Reply
#5
boa shuan shocam saia on miagou Upside_down
Reply
#6
in sprintf you need a %s after Modder:
_asm
Reply

Users browsing: 1 Guest(s)