15.04.2010, 20:37
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
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 :
Thanx guys let's see if you can do it
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; }
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];