SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 17/05/2019, 03:34 PM   #1
Little Clucker
Join Date: Feb 2019
Posts: 37
Reputation: 0
Default /givemoney

When I use /givemoney playerid money give 0$
	new bani, player, playerul[MAX_PLAYER_NAME], admin[MAX_PLAYER_NAME], string[128], string2[128];
 	GetPlayerName(player, playerul,sizeof(playerul));
        GetPlayerName(playerid, admin, sizeof(admin));
	format(string, sizeof(string), "Admin-ul %s ti-a dat %d lei.", admin, bani);
	format(string2, sizeof(string2), "I-ai dat %d lei lui %s.", bani, playerul);
	GivePlayerMoney(player, bani);
	return 1;
ShaggyShaggy is offline   Reply With Quote
Old 17/05/2019, 03:39 PM   #2
Huge Clucker
Heress's Avatar
Join Date: Mar 2018
Location: Lithuania
Posts: 262
Reputation: 7
Default Re: /givemoney

You should use sscanf
Sorry for my bad English

Respect: Kalcor, ******. Thank you for this great game!
Heress is offline   Reply With Quote
Old 17/05/2019, 03:44 PM   #3
Huge Clucker
ShadowMortar's Avatar
Join Date: Jul 2016
Location: Croatia
Posts: 279
Reputation: 56
Default Re: /givemoney

PHP Code:
CMD:givemoneyplayeridparams[ ] )
baniplayerplayerulMAX_PLAYER_NAME ], adminMAX_PLAYER_NAME ], string128 ], string2128 ];
GetPlayerNameplayerplayerul,sizeofplayerul ) );
GetPlayerNameplayeridadminsizeofadmin ) );
sscanfparams"ui"playerbani ) ) SendClientMessageplayerid, -1"Usage: /givemoney <player> <bani>");
formatstringsizeof( string ), "Admin-ul %s ti-a dat %d lei."adminbani);
formatstring2sizeof(string2), "I-ai dat %d lei lui %s."baniplayerul );
SendClientMessageplayerid,verde_deschis,string2 );
GivePlayerMoneyplayerban i);

ShadowMortar is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
cmd givemoney IceWizz Scripting Help 3 12/04/2017 09:24 AM
/givemoney value too big UltraScripter Scripting Help 12 10/11/2014 02:40 PM
[HELP] /givemoney MiGu3X Scripting Help 2 15/02/2013 12:40 AM
/givemoney Blackazur Scripting Help 7 16/11/2012 04:10 PM
/givemoney cmd help Face9000 Scripting Help 2 19/03/2012 09:25 PM

All times are GMT. The time now is 05:48 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.