09.02.2015, 22:28
Meu /car foi feito por um amigo, simples questao eu tenho um carro ( c outro player criar um carro o meu some ).
Codigos a Baixo
OnPlayerConnect:
Comandos:
GiveVehicle:
ajudem pfv ;-;
Codigos a Baixo
OnPlayerConnect:
Код:
CreatedVehicle[playerid] = 0;
Код:
CMD:car(playerid,params[]) { new veh[30], vehid, cor1, cor2 ; if(sscanf(params,"s[30]dd",veh,cor1,cor2)) return SendClientMessage(playerid,-1,"{FF0000}[ERRO] {C3C3C3} /car [nome ou ID] [cor1] [cor2]"); if(IsNumeric(veh)) vehid = strval(veh); else vehid = ReturnVehicleModelID(veh); if(vehid < 400 || vehid > 611) return SendClientMessage(playerid,-1,"{00FF00}[AVISO]{FFFFFF} Veнculo invalido"); { if(vehid == 520 || vehid == 432 || vehid == 592 || vehid == 425 || vehid == 464 || vehid == 406 || vehid == 476 || vehid == 447) return SendClientMessage(playerid, RED, "[INFO] Este veнculo nгo й permitido neste mundo."); } GiveVehicle(playerid,vehid,cor1,cor2); return 1; }
Код:
GiveVehicle(playerid,vehicleid, color1, color2) { if(!IsPlayerInAnyVehicle(playerid)) { if(CreatedVehicle[playerid]) DestroyVehicle(CreatedVehicle[playerid]); new Float:x, Float:y, Float:z, Float:angle,string2[85]; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); CreatedVehicle[playerid] = CreateVehicle(vehicleid, x, y, z, angle, color1, color2, -1); SetVehicleVirtualWorld(CreatedVehicle[playerid], GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(CreatedVehicle[playerid], GetPlayerInterior(playerid)); PutPlayerInVehicle(playerid, CreatedVehicle[playerid], 0); format(string2,sizeof(string2),"{00FF00}» Info « {FFFFFF}Vocк criou o veнculo %s ID: %d", VehicleNames[vehicleid-400],vehicleid); SendClientMessage(playerid, -1, string2); return 1; } return 0; }