[Pomoc] /cuff

Započeo xXxlumpiexXx, Avgust 17, 2011, 00:23:39 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: Noxicus (editam)
Detaljan opis problema: Evo ovako /cuff komanda radi samo u vozilu, ja bi htio da mogu i na nogama koristiti /cuff
Dio skripte:
CMD:cuff(playerid, params[])
	{
		new string[128];
		new idx;
		 
		new  sendername[MAX_PLAYER_NAME];
		new  giveplayer[MAX_PLAYER_NAME];
	    if(IsPlayerConnected(playerid))
	    {
			if(IsACop(playerid))
			{
			    temp = strtok(params, idx);
				if(!strlen(temp)) {
					SendClientMessage(playerid, COLOR_WHITE, "{168BFF}INFO: {959561} /cuff {959561}[ID/DioImena] {838361}");
					return 1;
				}
				giveplayerid = ReturnUser(temp);
			    if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
				       	if(IsACop(giveplayerid))
				        {
				            SendClientMessage(playerid, COLOR_GREY, "   Ne mozes cuffati PD/FBI/SWAT !");
					        return 1;
				        }
					    if(PlayerCuffed[giveplayerid] > 0)
					    {
					        SendClientMessage(playerid, COLOR_GREY, "   Igracu su vec stavljene lisice !");
					        return 1;
					    }
						if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
						    new car = GetPlayerVehicleID(playerid);
						    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Ne mozes sam sebe cuffovati!"); return 1; }
						    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
						    {
						        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
						        format(string, sizeof(string), "%s ti je stavio lisice, sve dok ih on ne skine.", sendername);
								SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
								format(string, sizeof(string), "Stavio si lisice igracu %s.", giveplayer);
								SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
								format(string, sizeof(string), " %s vadi lisice i stavlja ih %s.", sendername ,giveplayer);
								ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
								GameTextForPlayer(giveplayerid, "~r~Uhvacen", 2500, 3);
								TogglePlayerControllable(giveplayerid, 0);
								PlayerCuffed[giveplayerid] = 2;
								PlayerCuffedTime[giveplayerid] = 180;
						    }
						    else
						    {
						        SendClientMessage(playerid, COLOR_GREY, "   Igrac nije u vozilu ili ti nisi vozac !");
						        return 1;
						    }
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije u tvojoj blizini !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije online!");
				    return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac / FBI / National Guard !");
			}
		}
		return 1;
	}

Neke slike/video za lakse dobivanje pomoci(neobavezno):


evo ti...ali nisam testo ovo...
CMD:cuff(playerid, params[])
	{
		new string[128];
		new idx;

		new  sendername[MAX_PLAYER_NAME];
		new  giveplayer[MAX_PLAYER_NAME];
	    if(IsPlayerConnected(playerid))
	    {
			if(IsACop(playerid))
			{
			    temp = strtok(params, idx);
				if(!strlen(temp)) {
					SendClientMessage(playerid, COLOR_WHITE, "{168BFF}INFO: {959561} /cuff {959561}[ID/DioImena] {838361}");
					return 1;
				}
				giveplayerid = ReturnUser(temp);
			    if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
				       	if(IsACop(giveplayerid))
				        {
				            SendClientMessage(playerid, COLOR_GREY, "   Ne mozes cuffovati PD/FBI/SWAT !");
					        return 1;
				        }
					    if(PlayerCuffed[giveplayerid] > 0)
					    {
					        SendClientMessage(playerid, COLOR_GREY, "   Igracu su vec stavljene lisice !");
					        return 1;
					    }
						if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Ne mozes sam sebe cuffovati!"); return 1; }
						        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
						        format(string, sizeof(string), "%s ti je stavio lisice, sve dok ih on ne skine.", sendername);
								SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
								format(string, sizeof(string), "Stavio si lisice igracu %s.", giveplayer);
								SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
								format(string, sizeof(string), " %s vadi lisice i stavlja ih %s.", sendername ,giveplayer);
								ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
								GameTextForPlayer(giveplayerid, "~r~Uhvacen", 2500, 3);
								TogglePlayerControllable(giveplayerid, 0);
								PlayerCuffed[giveplayerid] = 2;
								PlayerCuffedTime[giveplayerid] = 180;
						    }
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije u tvojoj blizini !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije online!");
				    return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac / FBI / National Guard !");
			}
		}
		return 1;
	}
Vratio sam se ponovo ocekjute novi server...

samo ukloni ovo
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))

OptX