Jump to content

Recommended Posts

Posted

Poi ori o faci prin strcmp, ori prin ymcd, depinde.

Presupun ca prin acea comanda vrei sa iti apara o masina.

Varianta strcmp:

if(strcmp(cmd, "/spawncar", true) == 0)

{

new model,color1,color2,str[512];
if(sscanf(params, "iii", model,color1,color2)) return SendUsage(playerid,"/spawncar <model> <color1> <color2>");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(model, X,Y,Z, 0.0, color1, color2, -1);
return 1;
}
si ycmd:
YCMD:spawncar(playerid, params[], help)
{
new model,color1,color2,str[512];
if(sscanf(params, "iii", model,color1,color2)) return SendUsage(playerid,"/spawncar <model> <color1> <color2>");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(model, X,Y,Z, 0.0, color1, color2, -1);
return 1;
}
Posted

 

Poi ori o faci prin strcmp, ori prin ymcd, depinde.

Presupun ca prin acea comanda vrei sa iti apara o masina.

Varianta strcmp:

if(strcmp(cmd, "/spawncar", true) == 0)

{

new model,color1,color2,str[512];
if(sscanf(params, "iii", model,color1,color2)) return SendUsage(playerid,"/spawncar <model> <color1> <color2>");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(model, X,Y,Z, 0.0, color1, color2, -1);
return 1;
}
si ycmd:
YCMD:spawncar(playerid, params[], help)
{
new model,color1,color2,str[512];
if(sscanf(params, "iii", model,color1,color2)) return SendUsage(playerid,"/spawncar <model> <color1> <color2>");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(model, X,Y,Z, 0.0, color1, color2, -1);
return 1;
}

 

ma poti ajuta sa instalez ycmd?

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

moduri samp