30.12.2009, 20:59
I'm not smart enough to fix the errors on this script, its alot of errors i can't copy paste because its bullshit errors which always shows up when i do a big error in the script.
What am i doing wrong? I would like to learn from my mistakes
What i did was adding the if player is using a mask then set his name as stranger, it bugged it all up
What am i doing wrong? I would like to learn from my mistakes

Код:
if(strcmp(cmd, "/carwindows", true) == 0 || strcmp(cmd, "/windows", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsABike(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid, COLOR_GREY, "[Error] Bikes do not have windows");
return 1;
}
if(CarWindowStatus[GetPlayerVehicleID(playerid)] == 1)
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Stranger rolls down the window.");
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
PlayerActionMessage(playerid,15.0,"rolls down the window.");
CarWindowStatus[GetPlayerVehicleID(playerid)] = 0;
}
else if(CarWindowStatus[GetPlayerVehicleID(playerid)] == 0)
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Stranger rolls up the window.");
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
PlayerActionMessage(playerid,15.0,"rolls up the window.");
CarWindowStatus[GetPlayerVehicleID(playerid)] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[Error] You are not in a vehicle");
}
return 1;
}

