A littile help please!
#1

Hello there, I would need a little help here... So here's what I'm trying to do :
When the player says something, he will get +100 (pPoints). When the player has 100000 points on /stats (his status) his points will be reseted, and he will get a SendClientMessage(playerid, COLOR_whatever, "lol u got 100k points gg"); or something like that,
I figured it's under OnPlayerText so here's what I got, but it only gives him 100 points when he says the first thing on the server.
Example : When you say Hello, you get 100 pPoints but when you say anything else again, you just stay with those 100
Код:
if (realchat)
	{
	  if(gPlayerLogged[playerid] == 0)
	  {
	    return 0;
   	}
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "%s Says: %s", sendername, text);
		PlayerInfo[playerid][pPoints]+ 100;//this is kinda it, what should I put here to keep giving him points? :-S
		ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		return 0;
	}
	return 1;
}
I made the Points part to appear at /stats, it can be saved in the .ini file, but he only gets 100 points when he says any FIRST thing on the server... Also, you can modify someone's points trough /setstat, and it gets saved... But still only +100 when you say any first thing...
Also, more info about the pPoints if you need it :
Код:
if( strcmp( key , "Points" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPoints] = strval( val ); }
Код:
format(var, 32, "Points=%d\n",PlayerInfo[playerid][pPoints]);fwrite(hFile, var);
Код:
new carpoints = PlayerInfo[targetid][pPoints];
Thanx guys let's see if you can do it
Reply


Messages In This Thread
A littile help please! - by mihaitza55 - 15.04.2010, 20:37
Re: A littile help please! - by RSC_Quicker - 15.04.2010, 20:46
Re: A littile help please! - by mihaitza55 - 15.04.2010, 20:48
Re: A littile help please! - by RSC_Quicker - 15.04.2010, 21:16
Re: A littile help please! - by mihaitza55 - 16.04.2010, 07:28
Re: A littile help please! - by mihaitza55 - 16.04.2010, 18:51
Re: A littile help please! - by kLx - 16.04.2010, 19:21
Re: A littile help please! - by mihaitza55 - 16.04.2010, 20:29

Forum Jump:


Users browsing this thread: 1 Guest(s)