public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
{
if (IsPlayerInAnyVehicle(playerid))
{
new coche = GetPlayerVehicleID(playerid);
new nombre[MAX_PLAYER_NAME], string_freno[128], partes[7];
GetPlayerName(playerid, nombre, sizeof(nombre));
if(FrenodeMano[coche] == 1)
{
FrenodeMano[coche] = 0;
if(idioma == 0) format(string_freno, sizeof(string_freno), "* %s quitу el freno de mano al vehнculo.", nombre);
if(idioma == 1) format(string_freno, sizeof(string_freno), "* %s took the hand brake the vehicle.", nombre);
ProxDetector(30.0, playerid, string_freno, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GetVehicleParamsEx(coche, partes[0], partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
SetVehicleParamsEx(coche,VEHICLE_PARAMS_ON, partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
return 1;
}
if(FrenodeMano[coche] == 0)
{
FrenodeMano[coche] = 1;
GetVehiclePos(coche, VehFrenoPOS[coche][0], VehFrenoPOS[coche][1], VehFrenoPOS[coche][2]);
GetVehicleZAngle(coche, VehFrenoPOS[coche][3]);
SetVehicleVelocity(coche, 0, 0, 0);
if(idioma == 0) format(string_freno, sizeof(string_freno), "* %s colocу el freno de mano al vehнculo.", nombre);
if(idioma == 1) format(string_freno, sizeof(string_freno), "* %s put the hand brake the vehicle.", nombre);
ProxDetector(30.0, playerid, string_freno, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GetVehicleParamsEx(coche, partes[0], partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
SetVehicleParamsEx(coche,VEHICLE_PARAMS_OFF, partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
return 1;
}
}
}
return 1;
}
C:\Users\dani\Desktop\RolePlay\RolePlay\gamemodes\RRP.pwn(66478) : error 017: undefined symbol "partes"
C:\Users\dani\Desktop\RolePlay\RolePlay\gamemodes\RRP.pwn(66478) : warning 215: expression has no effect
C:\Users\dani\Desktop\RolePlay\RolePlay\gamemodes\RRP.pwn(66478) : error 001: expected token: ";", but found "]"
C:\Users\dani\Desktop\RolePlay\RolePlay\gamemodes\RRP.pwn(66478) : error 029: invalid expression, assumed zero
C:\Users\dani\Desktop\RolePlay\RolePlay\gamemodes\RRP.pwn(66478) : fatal error 107: too many error messages on one line
Would be better if you used OnPlayerKeyStateChange to use a key to activate when held down and deactivate when lifted.
|
pawn Код:
![]() EDIT : Fixed. cool FS, i will use it ![]() |
Would be better if you used OnPlayerKeyStateChange to use a key to activate when held down and deactivate when lifted.
|
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
{
if (IsPlayerInAnyVehicle(playerid))
{
new coche = GetPlayerVehicleID(playerid);
new nombre[MAX_PLAYER_NAME], string_freno[128], partes[7];
GetPlayerName(playerid, nombre, sizeof(nombre));
if(FrenodeMano[coche] == 1)
{
FrenodeMano[coche] = 0;
if(idioma == 0) format(string_freno, sizeof(string_freno), "* %s quitу el freno de mano al vehнculo.", nombre);
if(idioma == 1) format(string_freno, sizeof(string_freno), "* %s took the hand brake the vehicle.", nombre);
ProxDetector(30.0, playerid, string_freno, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GetVehicleParamsEx(coche, partes[0], partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
SetVehicleParamsEx(coche,VEHICLE_PARAMS_ON, partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
return 1;
}
if(FrenodeMano[coche] == 0)
{
FrenodeMano[coche] = 1;
GetVehiclePos(coche, VehFrenoPOS[coche][0], VehFrenoPOS[coche][1], VehFrenoPOS[coche][2]);
GetVehicleZAngle(coche, VehFrenoPOS[coche][3]);
SetVehicleVelocity(coche, 0, 0, 0);
if(idioma == 0) format(string_freno, sizeof(string_freno), "* %s colocу el freno de mano al vehнculo.", nombre);
if(idioma == 1) format(string_freno, sizeof(string_freno), "* %s put the hand brake the vehicle.", nombre);
ProxDetector(30.0, playerid, string_freno, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GetVehicleParamsEx(coche, partes[0], partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
SetVehicleParamsEx(coche,VEHICLE_PARAMS_OFF, partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
return 1;
}
}
}
return 1;
}
That's not very realistic, and there's already a handbrake key in GTA: SA.
|
That's not very realistic, and there's already a handbrake key in GTA: SA.
|