07.08.2012, 20:30
Galera, alguйm pode me ajudar, eu pesquisei em diversos tуpico ainda nгo tenho oque eu quero.
Eu quero um escudo, de preferкncia escudo e nгo porta, se possнvel um que defende, caso nгo dк deixe como estб o escudo.
Corda, eu pesquisei em muitos tуpico, e o problema й que, quando digito /slide ele vai descendo e nгo para, se eu aperta /stop eu vou direcionado para outro lugar.
E o tapete de prego, eu consegui esse aqui, sу que nгo sei o comando, e como nгo sei editar nгo sei como faзo apra saber o comando.
Eu quero um escudo, de preferкncia escudo e nгo porta, se possнvel um que defende, caso nгo dк deixe como estб o escudo.
Corda, eu pesquisei em muitos tуpico, e o problema й que, quando digito /slide ele vai descendo e nгo para, se eu aperta /stop eu vou direcionado para outro lugar.
E o tapete de prego, eu consegui esse aqui, sу que nгo sei o comando, e como nгo sei editar nгo sei como faзo apra saber o comando.
Quote:
COMANDO: /* bspikes.inc Gonзalo "BlueX" Rebelo © [iPs]TeaM © Funзхes: native CreateSpike(playerid,playername[]) = playerid ID do jogador. = playername Nome do jogador. native OnSpikeCreated(playerid,playername,spikeid,Float pikex,Floatpikey,Floatpikez); = playerid ID do jogador = spikeid ID do tapete de pregos = Float:X,Float:Y,Float:z Coordenadas do tapte de pregos. native IsPlayerInSpike(playerid,bool:engine,bool:fire,max speed,dfiretime); = playerid ID do jogador = bool:engine Condiзгo usada para desligar o motor. = bool:fire Condiзгo usada para criar fogo. = maxspeed Valor da velocidade necessбria para criar o fogo e/ou desligar o motor. = dfiretime Variavel usada para criar o tempo para eleminar o veiculo. native DestroySpike(playerid); = playerid ID do jogador. native TeleportToSpike(playerid,spikeid); = playerid ID do jogador. = spikeid ID do tapete de pregos native TurnEngineOff(playerid); = playerid ID do jogador native TurnEngineOn(playerid); = playerid ID do jogador native SetVehicleOnFire(playerid,bool:fire,firetime); = playerid ID do jogador = bool:fire Condiзгo usada para colocar fogo no veiculo e para eleminar o fogo do veiculo. = firetime Variavel usada para criar o tempo para eleminar o veiculo. native OnPlayerPassedSpike(playerid,bool:fire,bool:engine ); = playerid ID do jogador = bool:fire Condiзгo usada para verificar se quando passar pelo tapete de pregos cria fogo. = bool:engine Condiзгo usada para verificar se quando passar pelo tapete de pregos desliga o motor. native GetPlayerSpeed(playerid,maxspeed,dfiretime,bool:en gine,bool:fire); = playerid ID do jogador = maxspeed Valor da velocidade necessбria para criar o fogo e/ou desligar o motor = dfiretime Variavel usada para criar o tempo para eleminar o veiculo. = bool:engine Condiзгo usada para desligar motor. = bool:fire Condiзгo usada para criar fogo. */ #if defined _bspikes_included #endinput #endif #define _bspikes_included #include <a_samp> const C_MAX_SPIKES = 20; enum E_SPIKES_INFO { spikes_ID, spikes_PID, spikes_Creator[MAX_PLAYER_NAME], spikes_Created, Floatpikes_x, Floatpikes_y, Floatpikes_z }; new gSpikesInfo[C_MAX_SPIKES][E_SPIKES_INFO], id,gBug[MAX_PLAYERS] = 0, gVehicleEngine[MAX_VEHICLES], gVehicleOnFire[MAX_VEHICLES], gSpeed[MAX_PLAYERS], gVehicleInSpike[MAX_VEHICLES], gVehicleID[MAX_PLAYERS]; forward CreateSpike(playerid,playername[]); forward OnSpikeCreated(playerid,playername,spikeid,Float pikex,Floatpikey,Floatpikez); forward IsPlayerInSpike(playerid,bool:engine,bool:fire,dfi retime,maxspeed); forward DestroySpike(playerid); forward TeleportToSpike(playerid,spikeid); forward TurnEngineOff(playerid); forward TurnEngineOn(playerid); forward SetVehicleOnFire(playerid,bool:fire,firetime); forward OnPlayerPassedSpike(playerid,bool:fire,bool:engine ); forward GetPlayerSpeed(playerid,maxspeed,dfiretime,bool:en gine,bool:fire); public GetPlayerSpeed(playerid,maxspeed,dfiretime,bool:en gine,bool:fire){ if(GetSpeed(playerid) > maxspeed){ if(fire && engine){ SetVehicleOnFire(playerid,true,dfiretime),TurnEngi neOff(playerid); } else if(fire && !engine){ SetVehicleOnFire(playerid,true,dfiretime); } else if(!fire && engine){ TurnEngineOff(playerid); } if(gVehicleInSpike[GetPlayerVehicleID(playerid)] == 1){ KillTimer(gSpeed[playerid]); gVehicleInSpike[GetPlayerVehicleID(playerid)] = 0; if(funcidx("OnPlayerPassedSpike")) CallLocalFunction("OnPlayerPassedSpike","ddd",play erid,fire,engine); } } return 1; } public CreateSpike(playerid,playername[]){ if(id == C_MAX_SPIKES) return SendClientMessage(playerid,-1,"Voce atingiu o limite maximo de tapetes de pregos."); new Float:fSpikes[4]; GetPlayerPos(playerid,fSpikes[0],fSpikes[1],fSpikes[2]); GetPlayerFacingAngle(playerid,fSpikes[3]); strmid(gSpikesInfo[id][spikes_Creator],playername,0,24,24); gSpikesInfo[id][spikes_x] = fSpikes[0],gSpikesInfo[id][spikes_y] = fSpikes[1],gSpikesInfo[id][spikes_z] = fSpikes[2]; gSpikesInfo[id][spikes_Created] = 1; gSpikesInfo[id][spikes_ID] = CreateObject(2892,fSpikes[0],fSpikes[1],fSpikes[2]-1,0.0,0.0,fSpikes[3]); CallLocalFunction("OnSpikeCreated","dsdfff",player id,playername,id,fSpikes[0],fSpikes[1],fSpikes[2]); id++; return 1; } public IsPlayerInSpike(playerid,bool:engine,bool:fire,dfi retime,maxspeed){ new panels,doors,lights,tires; if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2){ for(new i; i<C_MAX_SPIKES; i++){ if(IsPlayerInRangeOfPoint(playerid,10.0,gSpikesInf o[i][spikes_x],gSpikesInfo[i][spikes_y],gSpikesInfo[i][spikes_z]) && gSpikesInfo[i][spikes_Created] == 1 && gBug[playerid] == 0){ GetVehicleDamageStatus(GetPlayerVehicleID(playerid ), panels, doors, lights, tires); UpdateVehicleDamageStatus(GetPlayerVehicleID(playe rid), panels, doors, lights, 15); if(fire && engine){ gSpeed[playerid] = SetTimerEx("GetPlayerSpeed",500,true,"ddddd",playe rid,dfiretime,maxspeed,true,true); gVehicleInSpike[GetPlayerVehicleID(playerid)] = 1; } else if(fire && !engine){ gSpeed[playerid] = SetTimerEx("GetPlayerSpeed",500,true,"ddddd",playe rid,dfiretime,maxspeed,true,false); gVehicleInSpike[GetPlayerVehicleID(playerid)] = 1; } else if(!fire && engine){ gSpeed[playerid] = SetTimerEx("GetPlayerSpeed",500,true,"ddddd",playe rid,dfiretime,maxspeed,false,true); gVehicleInSpike[GetPlayerVehicleID(playerid)] = 1; } gBug[playerid] ++; } } } return 1; } public TurnEngineOff(playerid){ new engine,lights,alarm,doors,bonnet,boot,objective,ca r; car = GetPlayerVehicleID(playerid); GetVehicleParamsEx(car,engine,lights,alarm,doors,b onnet,boot,objective); SetVehicleParamsEx(car,0,lights,alarm,doors,bonnet ,boot,objective); gVehicleEngine[car] = 0; return 1; } public DestroySpike(playerid){ for(new i; i<C_MAX_SPIKES; i++){ if(IsPlayerInRangeOfPoint(playerid,10.0,gSpikesInf o[i][spikes_x],gSpikesInfo[i][spikes_y],gSpikesInfo[i][spikes_z]) && gSpikesInfo[i][spikes_Created] == 1){ DestroyObject(gSpikesInfo[i][spikes_ID]); gSpikesInfo[i][spikes_Created] = 0; id --; } } return 1; } public TeleportToSpike(playerid,spikeid){ if(gSpikesInfo[spikeid][spikes_Created] == 0) return SendClientMessage(playerid,0xFF0000AA,"[ERRO]:{FFFFFF} ID invalido."); static sTele[128]; format(sTele,sizeof sTele,"[{FFFF00}AVISO{808080}]: {FFFFFF}Voce teleportou-se para o tapte de pregos {808080}%d{FFFFFF}.",spikeid); SendClientMessage(playerid,0x808080AA,sTele); SendClientMessage(playerid,0x808080AA,"Informaзхes sobre este tapete de pregos:"); format(sTele,sizeof sTele,"Criador: {FFFFFF}%s{808080} | ID: {FFFFFF}%d",gSpikesInfo[spikeid][spikes_Creator],IsPlayerConnected(gSpikesInfo[spikeid][spikes_PID]) ? (gSpikesInfo[spikeid][spikes_PID]) : (INVALID_PLAYER_ID)); SendClientMessage(playerid,0x808080AA,sTele); SetPlayerPos(playerid,gSpikesInfo[spikeid][spikes_x],gSpikesInfo[spikeid][spikes_y],gSpikesInfo[spikeid][spikes_z]); return 1; } public TurnEngineOn(playerid){ new engine,lights,alarm,doors,bonnet,boot,objective,ca r; car = GetPlayerVehicleID(playerid); GetVehicleParamsEx(car,engine,lights,alarm,doors,b onnet,boot,objective); SetVehicleParamsEx(car,1,lights,alarm,doors,bonnet ,boot,objective); gVehicleEngine[car] = 1; return 1; } public SetVehicleOnFire(playerid,bool:fire,firetime){ if(fire){ gVehicleID[playerid] = GetPlayerVehicleID(playerid); gVehicleOnFire[gVehicleID[playerid]] = CreateObject( 18689,0,0,0,0,0,0,80 ); AttachObjectToVehicle( gVehicleOnFire[gVehicleID[playerid]], gVehicleID[playerid], 1.100000, 1.600000, -2.300000, 0.000000, 0.000000, 0.000000 ); SetTimerEx("SetVehicleOnFire",firetime,false,"ddd" ,playerid,false,0); } else DestroyObject(gVehicleOnFire[gVehicleID[playerid]]),gBug[playerid] = 0; return 1; } GetSpeed ( playerid , mode = 1 ) { static Floatoskm [3]; GetVehicleVelocity ( GetPlayerVehicleID ( playerid ) , poskm [ 0 ] , poskm [ 1 ] , poskm [ 2 ] ) ; return IsPlayerInAnyVehicle ( playerid ) ? floatround ( ( ( floatsqroot ( ( ( poskm [ 0 ] * poskm [ 0 ] ) + ( poskm [ 1 ] * poskm [ 1 ] ) + ( poskm [ 2 ] * poskm [ 2 ] ) ) ) * ( !mode ? 105.0 : 170.0 ) ) ) * 1 ) : 0; } |
Lembrando galera, por favor caso consigam o cуdigo, enviar com defines e tudo pois eu nгo sei editar sу sei apenas compilar....
BRIGADГO, CASO QUEIRAM ME AJUDA ADC MEU MSN DAVITELES10@HOTMAIL.COM
BRIGADГO, CASO QUEIRAM ME AJUDA ADC MEU MSN DAVITELES10@HOTMAIL.COM