13.08.2017, 16:33
PHP код:
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
}
PHP код:
stock gAngle(playerid)
{
new vehicleid;
if(IsPlayerInAnyVehicle(playerid)) vehicleid = GetPlayerVehicleID(playerid); //bloco 1 com restriзгo
{
//bloco 2 sem restriзхes
GetVehiclePos(vehicleid, xCoord, yCoord, zCoord);
GetVehicleZAngle(vehicleid, aCoord);
}
return 1;
}
Exemplo:
PHP код:
main(){
new a, b;
b = 8;
if(b == 7) a = 1;
{
printf("a: %d | b: %d", a, b);
}
//Saнda: a: 0 | b: 8
}
PHP код:
if(listitem == 0 && aAttach[vehicleid] == 0)
{
Spoiler(playerid);
SetObjectMaterial(cMaterial[playerid], 0, 19341, "break_f_w", "dyn_f_r_wood_1b", DodgerBlue);
AttachObjectToVehicle(cMaterial[playerid] , vehicleid, 0.010000, -2.165001, 0.359999, 0, 0, 0);
}
if(listitem == 1 && aAttach[vehicleid] == 0)
{
Spoiler(playerid);
SetObjectMaterial(cMaterial[playerid], 0, 19341, "break_f_w", "dyn_f_r_wood_1b", DeepSkyBlue);
AttachObjectToVehicle(cMaterial[playerid] , vehicleid, 0.010000, -2.165001, 0.359999, 0, 0, 0);
}
//...
if(listitem == 11 && aAttach[vehicleid] == 1)
{
DestroyObject(cMaterial[playerid]);
aAttach[vehicleid] = 0;
}
PHP код:
if(aAttach[vehicleid]){
if(listitem == 11)
{
DestroyObject(cMaterial[playerid]);
aAttach[vehicleid] = 0;
}
}
else{
if(listitem == 0)
{
Spoiler(playerid);
SetObjectMaterial(cMaterial[playerid], 0, 19341, "break_f_w", "dyn_f_r_wood_1b", DodgerBlue);
AttachObjectToVehicle(cMaterial[playerid] , vehicleid, 0.010000, -2.165001, 0.359999, 0, 0, 0);
}
//...
}
PHP код:
if(response)
{
ShowPlayerDialog(playerid, DIALOG_MENU_TUNNING, DIALOG_STYLE_LIST, "Selecione o que deseja tunar", "Spoilers Coloridos", "OK", "Voltar");
}
else
{
SetCameraBehindPlayer(playerid);
}
PHP код:
if(!response)
{
setAngle(playerid);
SendClientMessage(playerid, -1, "{254AA1}[INFO]: Vocк saiu da Oficina.");
}
if(response)
{
ShowPlayerDialog(playerid, DIALOG_MENU_TUNNING, DIALOG_STYLE_LIST, "Selecione o que quer tunar", "Spoilers Coloridos", "OK", "Voltar");
}
OnPlayerKeyStateChange:
PHP код:
if(GetVehicleModel(vehicleid) != 560) return SendClientMessage(playerid, -1, "{A12525}[ERRO]: Nosso Sistema ainda estб em fase ALPHA, e sу tem suporte para tunar o Sultan !");
{
}
PHP код:
if(IsPlayerInAnyVehicle(playerid)) vehicleid = GetPlayerVehicleID(playerid);
{
}
PHP код:
else if(GetPlayerVehicleID(vehicleid == 560))
Parabйns pelo sistema.