usage : /reward /buycar /getcar /sellcar /mycars

Started by RDXing_KR, Apr 21, 2016, 12:04 PM

Previous topic - Next topic

RDXing_KR

i want that commands for my server so please can i have that commands?

Syntax
/getcar <ID>
[#00ff00]Spawning Vehicle [ <CARNAME>]
/buycar <ID>
[#00FFFF]You've bought the [ <Carname> ] for cash [<cashbought>]
/sellcar <ID>
[#FF0000]Your [<carname>]is selled in Car Showroom in amount of[<soldcaramount>a half of selling price]
/mycars

--------------------------------------
/reward <amount> (Admin Command)
[#00ffff]Admin [<GetAdminName>]Rewarded [<getrewardedname>] amount [<amountrewarded>]



-Xing

KAKAN

Sure,
function onPlayerCommand( player, cmd, text ){
if( cmd == ( "getcar" || "buycar" || "sellcar" ) ){
local a = "";
if( !text ) MessagePlayer( "/" + cmd + "< ID >", player );
else{
switch( cmd ){
case "getcar": a = "[#00ff00]Spawning Vehicle [ <CARNAME>]"; break;
case "buycar": a = "[#00FFFF]You've bought the [ <Carname> ] for cash [<cashbought> ]"; break;
case "sellcar": a = "[#FF0000]Your [<carname>]is selled in Car Showroom in amount of[<soldcaramount>a half of selling price]"; break;
}
MessagePlayer( a, player );
}
}
else if( cmd == "mycars" ) MessagePlayer("",player);
else if( cmd == "reward" ){
if(!text) MessagePlayer("/reward <amount> (Admin Command)");
else Message( "[#00ffff]Admin [<GetAdminName>]Rewarded [<getrewardedname>] amount [<amountrewarded>]", player );
I test, and it warks! :)
oh no

RDXing_KR

But i need a action its just text by
/getcar <id>
Spawned car [
in order not bought a car msg should be : You don't own any vehicle

RDXing_KR

Quote from: KAKAN on Apr 21, 2016, 12:15 PMSure,
function onPlayerCommand( player, cmd, text ){
if( cmd == ( "getcar" || "buycar" || "sellcar" ) ){
local a = "";
if( !text ) MessagePlayer( "/" + cmd + "< ID >", player );
else{
switch( cmd ){
case "getcar": a = "[#00ff00]Spawning Vehicle [ <CARNAME>]"; break;
case "buycar": a = "[#00FFFF]You've bought the [ <Carname> ] for cash [<cashbought> ]"; break;
case "sellcar": a = "[#FF0000]Your [<carname>]is selled in Car Showroom in amount of[<soldcaramount>a half of selling price]"; break;
}
MessagePlayer( a, player );
}
}
else if( cmd == "mycars" ) MessagePlayer("",player);
else if( cmd == "reward" ){
if(!text) MessagePlayer("/reward <amount> (Admin Command)");
else Message( "[#00ffff]Admin [<GetAdminName>]Rewarded [<getrewardedname>] amount [<amountrewarded>]", player );
I test, and it warks! :)
Quote from: KAKAN on Apr 21, 2016, 12:15 PMSure,
function onPlayerCommand( player, cmd, text ){
if( cmd == ( "getcar" || "buycar" || "sellcar" ) ){
local a = "";
if( !text ) MessagePlayer( "/" + cmd + "< ID >", player );
else{
switch( cmd ){
case "getcar": a = "[#00ff00]Spawning Vehicle [ <CARNAME>]"; break;
case "buycar": a = "[#00FFFF]You've bought the [ <Carname> ] for cash [<cashbought> ]"; break;
case "sellcar": a = "[#FF0000]Your [<carname>]is selled in Car Showroom in amount of[<soldcaramount>a half of selling price]"; break;
}
MessagePlayer( a, player );
}
}
else if( cmd == "mycars" ) MessagePlayer("",player);
else if( cmd == "reward" ){
if(!text) MessagePlayer("/reward <amount> (Admin Command)");
else Message( "[#00ffff]Admin [<GetAdminName>]Rewarded [<getrewardedname>] amount [<amountrewarded>]", player );
I test, and it warks! :)
Bro it's just giving msg not doing its action and only /getcar command is alive all others not working @KAKAN Plz Give me a right one

KAKAN

Quote from: RDXing_KR on Apr 21, 2016, 12:36 PMBro it's just giving msg not doing its action and only /getcar command is alive all others not working @KAKAN Plz Give me a right one
Bro, why don't you check the 'SCRIPT SHOWROOM' before posting? Here's the script you want:
http://forum.vc-mp.org/?topic=1454.0
About /reward, try making it yourself, if it doesn't work, then we are there to help yo!
oh no

Thijn

Locked. Go make it yourself, we aren't scripting robots doing what you ask us to.
Go look in the snippets and script showroom and try to make it yourself. We're here to help you if you encounter errors.