SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 15/02/2009, 01:05 PM   #1
amrour
Little Clucker
 
Join Date: May 2008
Posts: 47
Reputation: 0
Default /givecash

well i wanna make /givecash command for my script but i don't know how, can anyone help me?
amrour is offline  
Old 15/02/2009, 01:09 PM   #2
[RP]Rav
Huge Clucker
 
Join Date: Oct 2007
Posts: 262
Reputation: 0
Default Re: /givecash

I will give you some functions you can look at instead (evil, I know )

GetPlayerMoney(playerid)
GivePlayerMoney(playerid, amount)
[RP]Rav is offline  
Old 15/02/2009, 01:59 PM   #3
arnoldziux
Big Clucker
 
Join Date: Oct 2007
Posts: 140
Reputation: 0
Default Re: /givecash

Quote:
Originally Posted by Lenny.
well i wanna make /givecash command for my script but i don't know how, can anyone help me?
Just simply get it out of lvdm
arnoldziux is offline  
Old 15/02/2009, 03:23 PM   #4
amrour
Little Clucker
 
Join Date: May 2008
Posts: 47
Reputation: 0
Default Re: /givecash

Quote:
Originally Posted by Jump3r
Quote:
Originally Posted by Lenny.
well i wanna make /givecash command for my script but i don't know how, can anyone help me?
Just simply get it out of lvdm
how? when i copy the command it gives me like million errors.
amrour is offline  
Old 15/02/2009, 03:38 PM   #5
Marcel
Huge Clucker
 
Join Date: Nov 2007
Posts: 382
Reputation: 2
Default Re: /givecash

dcmd and sscanf.
Marcel is offline  
Old 15/02/2009, 04:55 PM   #6
rensfromrpas
Big Clucker
 
Join Date: May 2008
Posts: 102
Reputation: 0
Default Re: /givecash

you'll need strtok:
(note i didn't test it)
Code:
if(!strcmp(cmd, "/givecash", true)
{
   tmp = strtok(cmdtext, idx);
   if(!strlen(tmp)) return SendClientMessage(playerid, 0xC0C0C0/*samp color :)*/, "USAGE: /givecash [ammount]");
   GivePlayerMoney(playerid, strval(tmp));  
   return 1;
}
rensfromrpas is offline  
 

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
/givecash 02manchestera Help Archive 3 14/03/2010 03:51 PM
Givecash bug Puzi Help Archive 5 07/03/2010 02:23 AM
givecash Lajko1 Help Archive 6 09/10/2009 11:06 PM
PLease help with /givecash Scoots Help Archive 28 27/03/2009 12:42 PM
givecash CJ101 Help Archive 1 19/02/2009 03:05 PM


All times are GMT. The time now is 02:00 AM.


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