26.12.2009, 23:00
that's what I was looking for but do not understand how commands
example:this command is to paint the car
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(ccolor, 6, cmdtext);
return 0;
}
dcmd_ccolor(playerid, params[])
{
if(Checkpoint[playerid] == true)
{
new color[2]; dos espacios para guardar, 0 y 1)
nueva cadena [128];
if (sscanf (params, "dd", color [0], color [1]))
(
SendClientMessage (playerid, COLOR_RED, "Uso correcto: / cColor [color 1] [color 2 ].");
)
else if (0> color [0]> 126 | | 0> color [1]> 126)
(
SendClientMessage (playerid, COLOR_RED, "Error: Los colores Debe ser entre 0 y 126");
)
algo mбs
(
if (GetPlayerState (playerid) == PLAYER_STATE_DRIVER)
(
ChangeVehicleColor (GetPlayerVehicleID (playerid), color [0], color [1]);
(formato de cadena, sizeof (cadena), "їHa cambiando el color de tu vehiculo! (color 1:% d, color 2:% d).", color [0], color [1]);
SendClientMessage (playerid, COLOR_GREEN, string);
)
algo mбs
(
SendClientMessage (playerid, COLOR_RED, "Error: no estas adentro de ningun vehiculo!");
)
)
)
algo mбs
(
SendClientMessage (playerid, COLOR_RED, "Error: Necesitas estar en el puesto de control para cambiar tu color!");
)
return 1;
)
I want to do a command for nitro car wheels etc. tuneup.
example:this command is to paint the car
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(ccolor, 6, cmdtext);
return 0;
}
dcmd_ccolor(playerid, params[])
{
if(Checkpoint[playerid] == true)
{
new color[2]; dos espacios para guardar, 0 y 1)
nueva cadena [128];
if (sscanf (params, "dd", color [0], color [1]))
(
SendClientMessage (playerid, COLOR_RED, "Uso correcto: / cColor [color 1] [color 2 ].");
)
else if (0> color [0]> 126 | | 0> color [1]> 126)
(
SendClientMessage (playerid, COLOR_RED, "Error: Los colores Debe ser entre 0 y 126");
)
algo mбs
(
if (GetPlayerState (playerid) == PLAYER_STATE_DRIVER)
(
ChangeVehicleColor (GetPlayerVehicleID (playerid), color [0], color [1]);
(formato de cadena, sizeof (cadena), "їHa cambiando el color de tu vehiculo! (color 1:% d, color 2:% d).", color [0], color [1]);
SendClientMessage (playerid, COLOR_GREEN, string);
)
algo mбs
(
SendClientMessage (playerid, COLOR_RED, "Error: no estas adentro de ningun vehiculo!");
)
)
)
algo mбs
(
SendClientMessage (playerid, COLOR_RED, "Error: Necesitas estar en el puesto de control para cambiar tu color!");
)
return 1;
)
I want to do a command for nitro car wheels etc. tuneup.