PDA

View Full Version : Need Help!!..


Edvin
03/12/2011, 04:11 PM
CMD:resetallcoins( PARAMS )
{
if ( !IsPlayerAdmin( playerid ) ) return 1;

foreach(Player, i )
{
dUserSetINT( i ).( "Coins", 0 );
}
return 1;
}

I need this to reset all player coins. This command will be used once time at my server.

and i got this errors:

C:\Documents and Settings\user\My Documents\RAS&MAP&FS&SERVERS\RAS\gamemodes\RAS.pwn(21471) : error 035: argument type mismatch (argument 1)

Line: dUserSetINT( i ).( "Coins", 0 );

I stuck at this one...

Edvin
03/12/2011, 04:35 PM
BUMP UP!

English-Conceptz
03/12/2011, 04:54 PM
reset coins ? you mean money ? if so then just use :



SendClientMessage(playerid, 0xFFFFFFAA, "Your Cash Has Been Reset!");
ResetPlayerMoney(playerid);
return 1;



or if you want to reset someones money:

top of your script
#include <sscanf>
in your command:

new giveplayerid;
if ( sscanf( params, "u", giveplayerid ) ) return SendClientMessage( playerid, COLOR_RED, "USAGE: {FFFF00}/resetallcoins [playerID]" );
ResetPlayerMoney(giveplayerid);


code might be wrong im still noob but the idea is there :)

if your didnt mean money please explain further ?
if i was right please Rep me :)

Edvin
03/12/2011, 05:03 PM
No, i have coins in my server. And i want to reset all player coins without if the players is online or no...

English-Conceptz
03/12/2011, 05:11 PM
you would have to open all the ini files of your players at the same time and reset the same value for all players.

id pm ****** because i dont know if you can do that =/

Edvin
04/12/2011, 06:02 AM
Please don't tell people to do that! Why should PMing me get a response if I've not replied in the public forum?
I don't know, i thought you don't saw my topic...

Rac3r
04/12/2011, 06:47 AM
Seach it, I don't use dUser, but I saw this in the first few results:
dUserSetINT (PlayerName (playerid)). ("loancash", 0);
Compared to yours:
dUserSetINT( i ).( "Coins", 0 );

Spot the difference.

Edvin
04/12/2011, 07:11 PM
Seach it, I don't use dUser, but I saw this in the first few results:
dUserSetINT (PlayerName (playerid)). ("loancash", 0);
Compared to yours:
dUserSetINT( i ).( "Coins", 0 );

Spot the difference.
Man! I just need to reset all player coins in all users, what are on host. If the player is connected or if it is not...

Sascha
04/12/2011, 07:15 PM
which include is that btw? would help to get the correct code for it..