if(strcmp(cmd, "/v", true) == 0)
{
new tmp[256], tmp2[256], tmp3[256], IndexD; tmp = strtok(params,IndexD), tmp2 = strtok(params,IndexD); tmp3 = strtok(params,IndexD);
if(!strlen(tmp)) return SCM(playerid, -1, ""RO"* Uso: /v [nombre / id]");
new car;
if(!IsNumeric(tmp))
car = GetVehicleModelIDFromName(tmp); else car = strval(tmp);
if(car < 400 || car > 611) return SCM(playerid, 0xFF0000AA, ""RO"* ID o nombre del vehнculo invбlido!");
CarSpawner(playerid,car);
new string[120];
format(string, sizeof(string), "Has spawneado un %s (Modelo: %d)", VehicleNames[car-400], car);
SendClientMessage(playerid, -1, string);
return 1;
}
CMD:v(playerid, params[])
{
new id;
if(sscanf(params, "d", id)) return SCM(playerid, -1, ""RO"* Uso: /v [nombre / id]");
if(!IsNumeric(params))
id = GetVehicleModelIDFromName(params); else id = strval(params);
if(id < 400 || id > 611) return SCM(playerid, 0xFF0000AA, ""RO"* ID o nombre del vehнculo invбlido!");
CarSpawner(playerid, id);
new string[120];
format(string, sizeof(string), "Has spawneado un %s (Modelo: %d)", VehicleNames[id-400], id);
SCM(playerid, -1, string);
return 1;
}
CMD:v(playerid, params[])
{
new id;
if(sscanf(params, "d", id)) return SCM(playerid, -1, ""RO"* Uso: /v [nombre / id]");
if(!IsNumeric(params))
if(id < 400 || id > 611) return SCM(playerid, 0xFF0000AA, ""RO"* ID o nombre del vehнculo invбlido!");
CarSpawner(playerid, id);
new string[120];
format(string, sizeof(string), "Has aparecido un coche/auto %s (Modelo: %d)", VehicleNames[id-400], id);
SCM(playerid, -1, string);
return 1;
}
CMD:v(playerid, params[])
{
new id;
if(sscanf(params, "u", id)) return SCM(playerid, -1, ""RO"* Uso: /v [nombre/id]");
if(!IsNumeric(id)){
id = GetVehicleModelIDFromName(id);
}
else{
id = strval(id);
}
if(id < 400 || id > 611) return SCM(playerid, 0xFF0000AA, ""RO"* ID o nombre del vehнculo invбlido!");
CarSpawner(playerid, id);
new string[120];
format(string, sizeof(string), "Has spawneado un %s (Modelo: %d)", VehicleNames[id-400], id);
SCM(playerid, -1, string);
return 1;
}
pawn Код:
|