17.02.2010, 10:18
Quote:
Originally Posted by andmeida10
ta ai:
Код:
if(strcmp(cmd, "/v", true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USO: /v [carid] [cor1] [cor2]"); new car; car = strval(tmp); if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, "O id do veiculo tem que ser entre 400 e 611!"); return 1; } tmp = strtok(cmdtext, idx); new color1; color1 = strval(tmp); if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_WHITE, "O id da cor й entre 0 e 126!"); return 1; } tmp = strtok(cmdtext, idx); new color2; color2 = strval(tmp); if(color2 < 0 || color2 > 126) return SendClientMessage(playerid, COLOR_WHITE, "O id da cor й entre 0 e 126!"); new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); CreateVehicle(car, X,Y+2,Z, 0.0, color1, color2, 1500000); SetVehicleVirtualWorld(car, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(car, GetPlayerInterior(playerid)); return 1; } |