20.04.2018, 12:52
Quote:
Manda esses dois cуdigos
PHP код:
|
PHP код:
if ( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
ShowPlayerVelocimetro(playerid) ;
}
else
{
HidePlayerVelocimetro(playerid) ;
}
if(Player[playerid][pMTX] == 1)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
if(IsABike(GetPlayerVehicleID(playerid)))
{
switch(GetPlayerSkin(playerid))
{
#define NOIX2{%0,%1,%2,%3,%4,%5} SetPlayerAttachedObject(playerid, SLOT, 18976, 2, (%0), (%1), (%2), (%3), (%4), (%5));
case 0, 65, 74, 149, 208, 273: NOIX2{0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000}
case 1..6, 8, 14, 16, 22, 27, 29, 33, 41..49, 82..84, 86, 87, 119, 289: NOIX2{0.070000, 0.000000, 0.000000, 88.000000, 77.000000, 0.000000}
case 7, 10: NOIX2{0.090000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
case 9: NOIX2{0.059999, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
case 11..13: NOIX2{0.070000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
case 15: NOIX2{0.059999, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
case 17..21: NOIX2{0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 23..26, 28, 30..32, 34..39, 57, 58, 98, 99, 104..118, 120..131: NOIX2{0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 40: NOIX2{0.050000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
case 50, 100..103, 148, 150..189, 222: NOIX2{0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
case 51..54: NOIX2{0.100000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
case 55, 56, 63, 64, 66..73, 75, 76, 78..81, 133..143, 147, 190..207, 209..219, 221, 247..272, 274..288, 290..293: NOIX2{0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 59..62: NOIX2{0.079999, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
case 77: NOIX2{0.059999, 0.019999, 0.000000, 87.000000, 82.000000, 0.000000}
case 85, 88, 89: NOIX2{0.070000, 0.039999, 0.000000, 88.000000, 82.000000, 0.000000}
case 90..97: NOIX2{0.050000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 132: NOIX2{0.000000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 144..146: NOIX2{0.090000, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
case 220: NOIX2{0.029999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
case 223, 246: NOIX2{0.070000, 0.050000, 0.000000, 88.000000, 82.000000, 0.000000}
case 224..245: NOIX2{0.070000, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
case 294: NOIX2{0.070000, 0.019999, 0.000000, 91.000000, 84.000000, 0.000000}
case 295: NOIX2{0.050000, 0.019998, 0.000000, 86.000000, 82.000000, 0.000000}
case 296..298: NOIX2{0.064999, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
case 299: NOIX2{0.064998, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
}
}
}
else
{
RemovePlayerAttachedObject(playerid, SLOT);
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
SCM(playerid, COR_ROXO, "[INFO] Para ver todos os comandos em relaзгo ao veнculo, digite /meuveh!");
}
if(newstate == PLAYER_STATE_DRIVER)
{
if(Privados(GetPlayerVehicleID(playerid)))
{
if(Player[playerid][pPMRJ] >= 1 || Player[playerid][pPCRJ] >= 1 || Player[playerid][pReporterLS] >= 1)
{
}
else
{
RemovePlayerFromVehicle(playerid);
SCM(playerid, COR_ERRO, "[ERRO] Vocк nгo pode pegar esse veнculo!");
}
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
if(VeiculosMTX(GetPlayerVehicleID(playerid)))
{
if(Player[playerid][pMTX] < 1)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+1);
SCM(playerid, COR_ERRO, "[ERRO] Moto exclusiva para Moto Tбxis!");
}
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
if(VeiculosGM(GetPlayerVehicleID(playerid)))
{
if(Player[playerid][pAdmin] < 5)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+1);
SCM(playerid, COR_ERRO, "[ERRO] Veнculo exclusivo para Game-Master!");
}
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
if(VeiculosHelper(GetPlayerVehicleID(playerid)))
{
if(Player[playerid][pHelper] < 1)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+1);
SCM(playerid, COR_ERRO, "[ERRO] Veнculo exclusivo para Helpers!");
}
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
if(VeiculosVIP(GetPlayerVehicleID(playerid)))
{
if(Player[playerid][pVIP] >= 1)
{
}
else
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+1);
SCM(playerid, COR_ERRO, "[ERRO] Veнculo exclusivo para VIP's!");
}
}
}
return 1;
}
stock EVeiculoComMotorista(vehicleid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
return 1;
}
return 0;
}
PHP код:
if (strcmp("/comprararmas", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, DIALOG_COMPRARARMAS, DIALOG_STYLE_TABLIST_HEADERS, "Escolha a Arma Desejada","Armas\tValor\nM4-A1\t$30.000\nMP5\t$25.000\nAK-47\t$50.000\nDeagle\t$15.000","Comprar", "Cancelar");
return 1;
}
if(dialogid == DIALOG_COMPRARARMAS)
{
if(!response) return SCM(playerid, Vermelho,"[ERRO] Compra Cancelada.");
{
if(listitem == 0)
{
if(Player[playerid][pPresoADM] == 1 || Player[playerid][pPresoSF] == 1 || Player[playerid][pPresoLV] == 1 || Player[playerid][pPresoLS] == 1 || Player[playerid][InHospital] == true || Player[playerid][InHospital] == true || Player[playerid][InDM] == true)
return SCM(playerid, COR_ERRO, "[ERRO] Vocк nгo fazer isso!");
if(GetPlayerMoney(playerid) < 30000) return SCM(playerid,Vermelho,"[ERRO] Vocк nгo tem dinheiro para comprar esta arma.");
{
GivePlayerMoney(playerid,-30000);
SCM(playerid,COR_LIGHTBLUE,"Vocк comprou uma M4");
GivePlayerWeapon(playerid,31,3000000);
}
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 25000) return SCM(playerid, Vermelho,"[ERRO] Vocк nгo tem dinheiro para comprar estб arma.");
{
GivePlayerMoney(playerid,-25000);
SCM(playerid,COR_LIGHTBLUE,"Vocк comprou uma MP5");
GivePlayerWeapon(playerid,29,3000000);
}
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 30000) return SCM(playerid, Vermelho,"[ERRO] Vocк nгo tem dinheiro para comprar estб arma.");
{
GivePlayerMoney(playerid,-50000);
SCM(playerid,COR_LIGHTBLUE,"Vocк comprou uma AK-47");
GivePlayerWeapon(playerid,30,3000000);
}
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) < 15000) return SCM(playerid, Vermelho,"[ERRO] Vocк nгo tem dinheiro para comprar estб arma.");
{
GivePlayerMoney(playerid,-15000);
SCM(playerid,COR_LIGHTBLUE,"Vocк comprou uma Desert Eagle");
GivePlayerWeapon(playerid,24,3000000);
}
}
}
return 1;
}