Help with this small code
#1

Hello, this is a small code to promote a player to respected player after he reach 6k score, but seems don't work:

pawn Код:
if(GetPlayerScore(i) == 6000)
{
new m[128];
SendClientMessage(i,COLOR_PINK,"You have been promoted to respected player! Congrats!");
format(m, sizeof(m), "%s (%d) has been promoted to Respected Player!", nick,i);
SendClientMessageToAll(yellow, m);
PlayerInfo[i][pRespected] = 1;
new mrand =random(15000);
GivePlayerMoney(i,-mrand);
GameTextForPlayer(i, "~w~Promoted ~g~to ~r~Respected ~y~Player ~b~!", 5000, 5);
SetPlayerScore(i, GetPlayerScore(i) + 5);
}
It's inside a timer.
Reply
#2

Can we please see like the whole Timer, if so then thanks.
Reply
#3

It's the anticheat timer, for not using two separate timers (one for Anticheat and another for this),i regrouped in one.
Reply
#4

Okay then can I see your loop?

And can you please explain what happens when you reach 6k score?

Does it do something or it doesn't do anything?
Reply
#5

gtakillerIV: When I reach 6K score then I am Respected player. Try to replace i with playerid. Just to test if its working.
Reply
#6

no it simply need to put return 1; at the end ^^
Reply
#7

Quote:
Originally Posted by RedJohn
Посмотреть сообщение
gtakillerIV: When I reach 6K score then I am Respected player. Try to replace i with playerid. Just to test if its working.
It's inside a loop and playerid is not defined since he doesn't execute/do anything(Correct me if I'm wrong).

And I didn't really understand what happens.
Reply
#8

Sorry for double post.

Image this. If you have 18 years you are adult right?

So here if you have 6000 score you are Respected user on server, like ****** (just for example) on this forum. Get it now?
Reply
#9

Quote:
Originally Posted by lorizz
Посмотреть сообщение
no it simply need to put return 1; at the end ^^
Does if i put return 1; it will stop other things inside that timer? I think yes.

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Okay then can I see your loop?

And can you please explain what happens when you reach 6k score?

Does it do something or it doesn't do anything?
When you reach 6k you are a Respected Player.
Reply
#10

What Do You Mean?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)