06.05.2014, 17:06
(
Последний раз редактировалось moof2010; 07.05.2014 в 04:17.
)
Hi, i write this commnd
i put otherelse because i tester only on skill 1
if is true
it do the stuff and change este_masina_sport[playerid] to 1 but say me that the server say me that it unknowncommand.
But if is false
the server say me that it unknowncommand but it not run
even than este_masina_sport[playerid] is 0.
why? where is my mistake?
http://i.imgur.com/ZBs7tsz.jpg
Код:
else if (strcmp("/fura masina", cmdtext, true, 13) == 0) { if(job[playerid] == 6) { if(skill_hot_de_masini[playerid] == 1) { if(GetVehicleModel(GetClosestVehicle(playerid, 10)) != 0) { new model_masina[MAX_PLAYERS]; new este_masina_sport[MAX_PLAYERS]; este_masina_sport[playerid] = 0; valstr(model_masina[playerid],GetVehicleModel(GetClosestVehicle(playerid, 10))); SendClientMessage(playerid,0xFF0000FF, model_masina[playerid]); for(new i; i <= sizeof(masina_sport); i++) { if(GetVehicleModel(GetClosestVehicle(playerid, 10)) == masina_sport[i][model_m_m] ) { este_masina_sport[playerid] = 1; SendClientMessage(playerid,0xFF0000FF, "Nu ai reusit sa spargi incuietoarea."); new Float:vehx, Float:vehy, Float:vehz; GetVehiclePos(GetClosestVehicle(playerid, 10), vehx, vehy, vehz); SetTimerEx("alarma_masina",1000, false, "iifff", playerid,0, vehx, vehy, vehz); for(new j; j <= MAX_PLAYERS; j++) { if (IsPlayerInRangeOfPoint(j, 20.0, vehx, vehy, vehz) && j!=playerid) { SendClientMessage(playerid,0xFF0000FF, "Vei primi wanted 6 deoarece cineva a auzit alarma."); SetTimerEx("alarma_masina",1000, false, "iifff", j,0, vehx, vehy, vehz); SetPlayerWantedLevel(playerid, 6); wanted_level[playerid] = 6; } } if(wanted_level[playerid] == 0) { SendClientMessage(playerid,0xFF0000FF, "De data asta ai scapat, nu a auzit nimeni alarma."); } } } if(este_masina_sport[playerid] == 0) { new incercare[MAX_PLAYERS]; incercare[playerid] = random(10); if(incercare[playerid]<3) { SendClientMessage(playerid,0xFF0000FF, "Nu ai reusit sa spargi incuietoarea."); new Float:vehx, Float:vehy, Float:vehz; GetVehiclePos(GetClosestVehicle(playerid, 10), vehx, vehy, vehz); SetTimerEx("alarma_masina",1000, false, "iifff", playerid,0, vehx, vehy, vehz); for(new j; j <= MAX_PLAYERS; j++) { if (IsPlayerInRangeOfPoint(j, 20.0, vehx, vehy, vehz) && j!=playerid) { SendClientMessage(playerid,0xFF0000FF, "Vei primi wanted 6 deoarece cineva a auzit alarma."); SetTimerEx("alarma_masina",1000, false, "iifff", j,0, vehx, vehy, vehz); SetPlayerWantedLevel(playerid, 6); wanted_level[playerid] = 6; } } if(wanted_level[playerid] == 0) SendClientMessage(playerid,0xFF0000FF, "De data asta ai scapat, nu a auzit nimeni alarma."); } else { SendClientMessage(playerid,0xFF0000FF, "Ai reusit sa spargi incuietoarea dar alarma s-a declansat."); PutPlayerInVehicle(playerid, GetClosestVehicle(playerid, 10), 0); new Float:vehx, Float:vehy, Float:vehz; GetVehiclePos(GetClosestVehicle(playerid, 10), vehx, vehy, vehz); SetTimerEx("alarma_masina",1000, false, "iifff", playerid,0, vehx, vehy, vehz); for(new j; j <= MAX_PLAYERS; j++) { if (IsPlayerInRangeOfPoint(j, 20.0, vehx, vehy, vehz) && j!=playerid) { SendClientMessage(playerid,0xFF0000FF, "Vei primi wanted 6 deoarece cineva a auzit alarma."); SetTimerEx("alarma_masina",1000, false, "iifff", j,0, vehx, vehy, vehz); SetPlayerWantedLevel(playerid, 6); wanted_level[playerid] = 6; } } if(wanted_level[playerid] == 0) SendClientMessage(playerid,0xFF0000FF, "De data asta ai scapat, nu a auzit nimeni alarma."); } } } else { SendClientMessage(playerid,0xFF0000FF, "Nu este nici o masina langa tine."); } } else if(skill_hot_de_masini[playerid] == 2) { .... otherelse
if is true
Код:
if(GetVehicleModel(GetClosestVehicle(playerid, 10)) == masina_sport[i][model_m_m] )
But if is false
Код:
if(GetVehicleModel(GetClosestVehicle(playerid, 10)) == masina_sport[i][model_m_m] )
Код:
if(este_masina_sport[playerid] == 0)
why? where is my mistake?
http://i.imgur.com/ZBs7tsz.jpg