server unknowncommand
#1

Hi, i write this commnd
Код:
   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
i put otherelse because i tester only on skill 1

if is true
Код:
if(GetVehicleModel(GetClosestVehicle(playerid, 10)) == masina_sport[i][model_m_m] )
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
Код:
if(GetVehicleModel(GetClosestVehicle(playerid, 10)) == masina_sport[i][model_m_m] )
the server say me that it unknowncommand but it not run
Код:
if(este_masina_sport[playerid] == 0)
even than este_masina_sport[playerid] is 0.


why? where is my mistake?

http://i.imgur.com/ZBs7tsz.jpg
Reply
#2

Try to remove the " " space between this: /fura masina
Reply
#3

nothing change
Reply
#4

i tried to put all line on an custom callback "furamasina" and in /fura masina to pun an settimerex for furamasina and again the script was stoped at if(este_masina_sport[playerid] == 0)
Reply
#5

someone?? please ....
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)