25.01.2016, 20:09
Quote:
|
eso es un bug de gta...
para lo otro usa esta condiciуn if(strlen(tmp3) > 4) return 0; |
Код:
if(strcmp(cmd, "/crearcoche", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] < 3)
{
SendClientMessage(playerid, Rojo, "* No formas parte del Staff!");
return 1;
}
if(strcmp("Palmero", PlayerInfo[playerid][pAdName], true) == 0 || strcmp("Palmero2", PlayerInfo[playerid][pAdName], true) == 0)
{
tmp = strtokex(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, Blanco, "USO: /crearcoche [ModelID] [Color1] [Color2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, Rojo, "* Nъmero de vehнculo entre 400 y 611!"); return 1; }
tmp = strtokex(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, Blanco, "USO: /crearcoche [ModelID] [Color1] [Color2]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, Rojo, "* Nъmero de color no puede ser menor de 0 y mayor de 126!"); return 1; }
tmp = strtokex(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, Blanco, "USO: /crearcoche [ModelID] [Color1] [Color2]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, Rojo, "* Nъmero de color no puede ser menor de 0 y mayor de 126!"); return 1; }
new Float:X, Float:Y, Float:Z, Float:Angle;
enfrente (playerid, 5.0, X, Y, Z, Angle);
CreateLLLCar(playerid, car, X, Y, Z, Angle, color1, color2); // parбmetro NOEXISTE para indicar que es de admin
format(string, sizeof(string), "* Vehнculo %d creado.", TotalVeh);
SendClientMessage(playerid, Amarillo, string);
}
else
{
SendClientMessage(playerid, Rojo, "Comando inexistente");
return 1;
}
}
return 1;
}


