- Joined
- Oct 5, 2012
- Messages
- 36
- Reaction score
- 1
Hello That's my first tutorial about how to make a /goldrims cmd, so when a player types /goldrims it fines 20k from the player, and adds the Goldrims to their vehicle.
So at the start you need zcmd include.
And you need a_samp also.
Go at the start of your script, then add this 2 lines.
Press CTRL + F Then Find this.
Then Add this Line Above.
Then Add this Line Too, Its the Vehicle Component ID.
So it should be like this.
Then Add this line so it will be the 20k fine.
So it should be like this
Then Add the Last Line, The Client Message same as like, You have added goldrims to your vehicle Etc..
Then finally the Command should look like this.
Hope I helped you.
If you found any problems, Hit me up with a Comment,Or a PM.
So at the start you need zcmd include.
And you need a_samp also.
Go at the start of your script, then add this 2 lines.
PHP:
#include <a_samp>
#include <ZCMD>
Press CTRL + F Then Find this.
PHP:
OnPlayerCommandText
Then Add this Line Above.
PHP:
CMD:goldrims(playerid, params[])
Then Add this Line Too, Its the Vehicle Component ID.
PHP:
AddVehicleComponent(GetPlayerVehicleID(playerid),1080); // Component ID, 1080 For goldrims.
So it should be like this.
PHP:
CMD:goldrims(playerid, params[])
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1080); // Component ID, 1080 For goldrims.
Then Add this line so it will be the 20k fine.
PHP:
GivePlayerMoney(playerid,-20000); // Money Amount that will be fined from the player.
So it should be like this
PHP:
CMD:goldrims(playerid, params[])
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1080); // Component ID, 1080 For goldrims.
GivePlayerMoney(playerid,-20000); // Money Amount that will be fined from the player.
Then Add the Last Line, The Client Message same as like, You have added goldrims to your vehicle Etc..
PHP:
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Successfully Added Goldrims to Your Vehicle."); // The Message will be sent to the player when he type the cmd.
Then finally the Command should look like this.
PHP:
CMD:goldrims(playerid, params[])
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1080);
GivePlayerMoney(playerid,-20000);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Successfully Added Goldrims to Your Car.");
return 1;
}
Hope I helped you.
If you found any problems, Hit me up with a Comment,Or a PM.

Last edited: