[GameMode] [MY FIRST Server]Dm Server
#3

Quote:

>>>How To make command<<<
1-first you need to make cmd
Quote:
CMD:yourcommand(playerid,params[])
change 'yourcommand' to a command you want lets try 'car'
Quote:
CMD:car(playerid,params[])
2-now dont forget the
Quote:
{
here now :
Quote:
CMD:money(playerid,params[])
{
3-make the command info:
Quote:
CreateVehicle()
dont forget to do this controls :
Quote:
CreateVehicle(playerid,411);
now the Red number is the car id put any car id here are the ids :
https://sampwiki.blast.hk/wiki/Vehicle_Model_ID_List
---- now the:
Quote:
CreateVehicle(playerid,411);
dont forget that
now here lets make a message :
Quote:
SendClientMessage(playerid, 0xFFFFFF, "you have spawned a car");
now dont forget the return1;
Quote:
return 1;
}
Finally here the all command
Quote:
CMD:car(playerid,params[])
{
CreateVehicle(playerid,411);
SendClientMessage(playerid, 0xFFFFFF, "you have spawned a car");
return 1;
}

What? Everything is wrong in that:

1: Indention
2: CreateVehicle, parameters gone on holiday or something?
3: SendClientMessage, color needs to have the alpha characters too!

Here's an actual proper /car command, sort of your nature:

pawn Code:
CMD:car(playerid, params[])
{
     new Float:x, Float:y, Float:z, Float:f;
     GetPlayerPos(playerid, x, y, z);
     GetPlayerFacingAngle(playerid, f);
     CreateVehicle(411, x, y, z, f, -1, -1, -1);
     SendClientMessage(playerid, 0xFFFFFFFF, "You spawned a car.");
     return 1;
}
If the rest of the GM's has problems like this, I rate it 2/10.
Reply


Messages In This Thread
[MY FIRST Server]Dm Server - by Kells - 29.10.2013, 19:07
Re: [MY FIRST Server]Dm Server - by DStreet - 29.10.2013, 19:09
Re: [MY FIRST Server]Dm Server - by DanishHaq - 29.10.2013, 19:12
Re: [MY FIRST Server]Dm Server - by Kells - 29.10.2013, 19:15

Forum Jump:


Users browsing this thread: 1 Guest(s)