Quote:
Originally Posted by leonardo1434
Made it quirckly, just look in both commands and try get their logic's by your self.
pawn Код:
CMD:givemoney(playerid,params[]) { new money,people; if(sscanf(params,"ud",people,money))return SendClientMessage(playerid,-1,#usage /givemoney [id] [amount]); if(!IsPlayerConnected(people)) return SendClientMessage(playerid,-1,#not connected); if(playerid == people) return SendClientMessage(playerid,-1,#you can't give money to yourself.); GivePlayerMoney(playerid,-money); GivePlayerMoney(people,money); return 1; } new keys[MAX_PLAYERS]; CMD:givekey(playerid,params[]) { new people,key; if(sscanf(params,"ud",people,keys))return SendClientMessage(playerid,-1,#usage /givekey [id]); if(!IsPlayerConnected(people)) return SendClientMessage(playerid,-1,#not connected); if(playerid == people) return SendClientMessage(playerid,-1,#you can't give the key to yourself.); keys[playerid]-=key; keys[people]+=key; return 1; }
|
You misunderstood me. I can do those normal commands easy, but i want to do a command as this:
/give key (playerid)
/give money (playerid) (amount)
/give phone (playerid)
/give...
/give... You see, /give is one command. I hope you understand what do i mean.