ForceJogosX-Sua Diversao Nosso Tesouro

segunda-feira, 28 de março de 2011

[TUT]Trancando e destrancando veiculos

Bom galera, estou aqui de novo pra mostrar a você a como
trancar e destrancar o seu veiculo,vamos la.


Use esse comando 

if (strcmp(cmdtext, "/trancar", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,0xFF004040,"Você não pode trancar esse veiculo.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
}
SendClientMessage(playerid, 0x33AA33AA, "Veiculo Trancado");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
}
else
{
SendClientMessage(playerid, 0xFF004040, "Voce Nao Esta Em Um veiculo);
}
return 1;




Agora para destrancar
use esse comando;
 

if (strcmp(cmdtext, "/destrancar, true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,0xFF004040,"Você pode destrancar só as portas como o motorista);
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
}
SendClientMessage(playerid, 0x33AA33AA, Veiculo Trancado!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1057,pX,pY,pZ);
}
else
{
SendClientMessage(playerid, 0xFF004040, "Você não está em um veiculo.");
}
return 1;
}
  

[TUT]Ant DB

Crie uma nova public

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((oldkeys & KEY_FIRE)
{
RemovePlayerFromVehicle(playerid)
}
return 1;
}

Entrar/sair/equipar e etc.. apertando F/Enter

Bem simples. vou postar o código. pois n tem nada para explicar ^^

if ((newkeys==KEY_SECONDARY_ATTACK))//o nome do botão.
{
OnPlayerCommandText(playerid,"/entrar");//os comandos que serão usados quando for apertado F
OnPlayerCommandText(playerid,"/sair"); //os comandos que serão usados quando for apertado F
OnPlayerCommandText(playerid,"/batercartao"); //os comandos que serão usados quando for apertado F
OnPlayerCommandText(playerid,"/pegararma");//os comandos que serão usados quando for apertado F
}/

[Code] Disfarce Para Hitmans

if(strcmp(cmd, "/disfarceh", true) == 0) // O comando.
{
if(PlayerToPoint(2.0,playerid,X,Y,Z)) // Onde o Player Deve Estar.
{
if(PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember] == 8) // Definição da ORG dele.. pode ser aperfeiçoado dependendo do GM..
{
new x_apet[256];
x_apet = strtok(cmdtext, idx);
if(!strlen(x_apet)) {
SendClientMessage(playerid, TEAM_GROVE_COLOR, "|__________________Disfarce Hitman___________|");
SendClientMessage(playerid, 0xB12414AA, "Escolha o Seu Skin para Se disfarcar..");
SendClientMessage(playerid, COLOR_YELLOW, "Use: /disfarceh [Nome] para ficar com skin da ORG");
SendClientMessage(playerid, COLOR_YELLOW, "Nomes Validos: civil,Pm,alqaeda,Triads,BOPE");
SendClientMessage(playerid, COLOR_YELLOW, "Nomes Validos: civil1,palhaco,grove,Balas,vagos");
SendClientMessage(playerid, COLOR_YELLOW, "Nomes Validos: Mendingo seguranca exercito");
SendClientMessage(playerid, COLOR_YELLOW, "Para escolher ex /disfarceh BOPE");
SendClientMessage(playerid, TEAM_GROVE_COLOR, "|____________________________________________|");
return 1; }
if(strcmp(x_apet,"civil",true) == 0)
{
SendClientMessage(playerid,COLOR_WHITE, "Você agora está disfarçado de CIVIL.");// Manda mensagem para o player.

GivePlayerGP(playerid, 0); // Coloca / Tira Dinheiro do player.. dependendo do GM.. pode ser modificado.
SetPlayerSkin(playerid, 23); // Seta o Skin do player.
return 1;
}
if(strcmp(x_apet,"pm",true) == 0)
{
SendClientMessage(playerid,COLOR_ASSASINOS, "Você agora está disfarçado de Policia Militar.");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,266);
return 1;
}
if(strcmp(x_apet,"BOPE",true) == 0)
{
SendClientMessage(playerid,COLOR_ASSASINOS, "Você agora está disfarçado de BOPE.");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,285);
return 1;
}
if(strcmp(x_apet,"alqaeda",true) == 0)
{
SendClientMessage(playerid,COLOR_ASSASINOS, "Você agora está disfarçado de Alqaeda.");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,290);
return 1;
}
if(strcmp(x_apet,"triads",true) == 0)
{
SendClientMessage(playerid,COLOR_ASSASINOS, "Você agora está disfarçado de triads");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,122);
return 1;
}
if(strcmp(x_apet,"seguranca",true) == 0)
{
SendClientMessage(playerid,COLOR_WHITE, "Você agora está disfarçado de segurança.");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,163);
return 1;
}
if(strcmp(x_apet,"civil1",true) == 0)
{
SendClientMessage(playerid,COP_COLOR, "Você agora está disfarçado de Policia Civil.");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,59);
return 1;
}
if(strcmp(x_apet,"balas",true) == 0)
{
SendClientMessage(playerid,COP_COLOR, "Você agora está disfarçado de balas.");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,102);
return 1;
}
if(strcmp(x_apet,"vagos",true) == 0)
{
SendClientMessage(playerid,COP_COLOR, "Você agora está disfarçado de vagos.");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,109);
return 1;
}
if(strcmp(x_apet,"grove",true) == 0)
{
SendClientMessage(playerid,COP_COLOR, "Você agora está disfarçado de Groove.");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,107);
return 1;
}
if(strcmp(x_apet,"palhaco",true) == 0)
{
SendClientMessage(playerid,COLOR_ASSASINOS, "Você agora está disfarçado de Palhaço.");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,264);
return 1;
}
if(strcmp(x_apet,"mendingo",true) == 0)
{
SendClientMessage(playerid,COLOR_ASSASINOS, "Você agora está disfarçado de Mendingo.");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,78);
return 1;
}
if(strcmp(x_apet,"Exercito",true) == 0)
{
SendClientMessage(playerid,COLOR_ASSASINOS, "Você agora está disfarçado de Palhaço.");

GivePlayerGP(playerid, 0);
SetPlayerSkin(playerid,287);
return 1;
}
 
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Este comando não existe.");
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Você não está no Vestiario.");
}
}
Download HomeHots

[Tutorial]Como Correr de modo Igual ao CJ.


Esse Code é bastante simples.. só que eficiente..
Bom. muita gente tem aquela duvida.. de como fazer todos os personagens correr igual ao CJ.
Mas.... Como se faz?

é Facilimoo! Basta apenas vc ir até a linha OnGameModeInit, depois de { vocÊ adiciona isto: UsePlayerPedAnims();

E irá ficar assim:

public OnGameModeInit()
{
UsePlayerPedAnims();


pronto! compile seu GM e vá testar! 
Atenção! Adicionando UsePlayerPedAnims(); TODOS os personagen irão correr igual ao CJ! Se você retirar essa linha, Os personagens irão correr de modos diferenciados!

[FS]Labirinto

Um Labirinto No Samp
Voce Pode Criar Tele
Download HomeHots

Troca de Placa SA-MP 0.3c

Bom este Filter Script é basico, você pode escrever no maximo 8 Caracteres e no minimo 1 para mudar a placa do seu Veiculo. Digitando /mudarplaca automaticamente irá aparecer um Dialog pedindo para você escrever a sua 'placa'.




Download HomeHots