Jump to content
  • 0

MoveStats


Mihaela

Question

Buna seara la toti , am intalnit o problema pe care nu stiu sa o rezolv ... ma puteti ajuta voi va rog?:)

Chestia e ca vreau sa dea + stats ... adica eu daca am ceva status gen : 100 kills , 100 death si trimit de pe alt account 300 kills si 300 death ( cu movestats ) sa dea +...adica sa fie pe contul trimis 400 kills si 400 death.

else if(ems == 1)
			{
			    ems = 0;
			    //--------------------------------------------------------------
			    BUD::MultiSet(moveid, "iiiiiiiiiiiii",
			    "EnMS",         	ems,
			    "Donator",			AccInfo[playerid][donator],
			    "Kills",        	AccInfo[playerid][Kills],
			    "Deaths",       	AccInfo[playerid][Deaths],
			    "Hours",            AccInfo[playerid][hours],
			    "Respect",          AccInfo[playerid][Respectpl],
			    "NegRespect",       AccInfo[playerid][Respectmn],
			    "Score",            GetPlayerScore(playerid),
			    "Money",            GetPlayerMoney(playerid),
			    "Coins",            AccInfo[playerid][Coins],
			    "SPoints",          pinfo[playerid][XPoints],
			    "DriftP",           pinfo[playerid][DPoints],
			    "RaceP",            pinfo[playerid][RPoints]);
			    //--------------------------------------------------------------
                BUD::MultiSet(moverid, "iiiiiiiiiiii",
				"Kills", 			0,
				"Deaths",	 		0,
				"Score", 			0,
				"Money",            0,
				"Hours", 			0,
				"Respect", 			0,
				"NegRespect", 		0,
				"SPoints", 			0,
				"DriftP", 			0,
				"RaceP", 			0,
				"Coins", 			0,
				"Donator",			0);
				//--------------------------------------------------------------
				AccInfo[playerid][Kills] 	 = 0;   AccInfo[playerid][Deaths] = 0;
				AccInfo[playerid][Respectpl] = 0;	AccInfo[playerid][Coins]  = 0;
				AccInfo[playerid][Respectmn] = 0;	AccInfo[playerid][hours]  = 0;
			 	pinfo[playerid][XPoints] 	 = 0;	pinfo[playerid][DPoints]  = 0;
			 	pinfo[playerid][RPoints] 	 = 0;	SetPlayerMoney(playerid, 0);
			 	SetPlayerScore(playerid, 0);
				//--------------------------------------------------------------
				format(movestr, 128, "You have Successfully Moved your Stats to {FF0000}%s{FF9900}!", inputtext);
				SendClientMessage(playerid, orange, movestr);

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Ti-am dat un exemplu simpu, sper sa intelegi.

CMD:move( playerid, params[ ] )
{
	new
		KillsContVechi = 1, // sa presupunem ca asta era din contul vechi
	    KillsContNou = 2, // aici este ce e in contul nou
		TotalKills // aici vom salva totalul
	;
	    
   TotalKills = ( KillsContVechi + KillsContNou );
   
   // Dupa asta tu salvezi variabila TotalKills care cuprinde datele
   
   printf( "%i", TotalKills ); // Iti va da 3
   
   // dupa stergi valoarea
   KillsContVechi = 0;
   // ...
   // ...
   
   return 1;
}

Just Rock

Link to comment
Share on other sites

Puteai sa folosesti direct :

[pawn]enum stats

{

    stat1,

    stat2[64],

    Float:stat3

}

new s[MAX_PLAYERS][stats];

stock copyStats(player,target)

{

    for(new i; stats:i < stats; i++)

    {

        s[target][stats:i] = s[player][stats:i];

    }

    return 1;

}

//

#define copyStats(%0,%1) for(new i; stats:i < stats; i++) s[%1][stats:i] = s[%0][stats:i];[/pawn]

Pentru suport nu ezitati sa ma contactati printr-un mesaj privat sau un mesaj pe Y/M.(Scripting sa:mp/cs,ScripturiWEB,phpbb,mysql,ipb,photoshop,html)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.