/givecash
#1

well i wanna make /givecash command for my script but i don't know how, can anyone help me?
Reply
#2

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

GetPlayerMoney(playerid)
GivePlayerMoney(playerid, amount)
Reply
#3

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
Reply
#4

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.
Reply
#5

dcmd and sscanf.
Reply
#6

you'll need strtok:
(note i didn't test it)
Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)