[pomoc] /vuci & /pusti

Započeo Snich, Februar 26, 2011, 19:03:39 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Snich

FBI i LSPD imaju komandu da vuku i da puste igraca, ali kada ukucam /vuci ID , ne reaguje , samo pise da vucem igraca, ali ga uopce ne vuce..

if(strcmp(cmd, "/vuci", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(gTeam[playerid] == 2 || IsACop(playerid))
			{
				if(KnockedDown[playerid] == 1)
				{
					SendClientMessage(playerid, COLOR_GREY, "Ne mozete vuci kada ste unesvijesceni.");
					return 1;
				}
				if(PlayerTied[playerid] == 1)
				{
					SendClientMessage(playerid, COLOR_GREY, "   Vezani ste!");
					return 1;
				}
			    tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /vuci [ID Igraca/Dio Imena]");
					return 1;
				}
				giveplayerid = ReturnUser(tmp);
			    if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
				        if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
				        {
				            SendClientMessage(playerid, COLOR_GREY, "   Ne mozete vuci Policajca!");
					        return 1;
				        }
				        if(PlayerCuffed[giveplayerid] != 2)
				        {
				            SendClientMessage(playerid, COLOR_GREY, "   Igracu nisu stavljene lisice!");
					        return 1;
				        }
						if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Ne mozete vuci sami sebe!"); return 1; }
						    {
						        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
						        format(string, sizeof(string), "* %s vas vuce.", sendername);
								SendClientMessage(giveplayerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* Vucete %s-a.", giveplayer);
								SendClientMessage(playerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* %s vuce %s-a.", sendername ,giveplayer);
								ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						    }

						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije blizu vas !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Igrac je offline !");
				    return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "   Niste Policajac / FBI / SWAT !");
			}
		}
		return 1;
	}
	if(strcmp(cmd, "/pusti", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(gTeam[playerid] == 2)
			{
			    tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /pusti [ID Igraca/Dio Imena]");
					return 1;
				}
				giveplayerid = ReturnUser(tmp);
				if(IsPlayerConnected(giveplayerid))
				{
					if(giveplayerid != INVALID_PLAYER_ID)
					{
					    if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Ne mozete sebe pustiti!"); return 1; }
							if(PlayerCuffed[giveplayerid])
							{
							    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
							    format(string, sizeof(string), "* %s vas je pustio.", sendername);
								SendClientMessage(giveplayerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* Pustili ste %s-a.", giveplayer);
								SendClientMessage(playerid, COLOR_WHITE, string);
								TogglePlayerControllable(giveplayerid, 0);
							}
							else
							{
							    SendClientMessage(playerid, COLOR_GREY, "   Tome igracu nisu stavljene lisice !");
							    return 1;
							}
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije blizu vas !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac je offline !");
				    return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "   Niste Policajac / FBI / SWAT !");
			}
		}//not connected
		return 1;
	}

cristiane