[Pomoc] Script&Filterscript


Započeo nikcrack, Decembar 01, 2010, 19:36:40 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

if(strcmp(cmd, "/drag", true) == 0)
	{
	   if(IsPlayerConnected(playerid))
	   {
			if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
			{
     		    tmp = strtok(cmdtext, idx);
 			    if (!strlen(tmp))
 		      	return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /drag [playerid/PartOfName] [seatid]");
                giveplayerid = ReturnUser(tmp);

 			 	tmp = strtok(cmdtext, idx);
 			    if (!strlen(tmp))
 				return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /drag [playerid/PartOfName] [seatid]");
			    if(IsPlayerConnected(giveplayerid))
				{
				   if(giveplayerid != INVALID_PLAYER_ID)
				   {
			            if(seat < 1 || seat > 3) // this stays, that or the moron /detain'ing will put his suspect as driver
			            {
			                 SendClientMessage(playerid, COLOR_GRAD1, "The ID of seat cannot be above 3 or below 1.");
			   				 return 1;
						}
				        if(IsPlayerInAnyVehicle(giveplayerid)) // no need to explain
					    {
					        SendClientMessage(playerid, COLOR_GREY, "   Player is in car get him out 1st!");
					        return 1;
					    }
						if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
			   				if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot drag yourself!"); return 1; }
         					if(PlayerCuffed[giveplayerid] == 1)
		  	 				{
             				   	GetPlayerPos( playerid, DPositions[0][0], DPositions[0][1], DPositions[0][2]);
					    		GetPlayerPos( giveplayerid, DPositions[1][0], DPositions[1][1], DPositions[1][2]);
		        				GetVehiclePos( carid, DPositions[2][0], DPositions[2][1], DPositions[2][2]); // makes it so you need to be close to your car
		 						GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
								format(string, sizeof(string), "* You were drug by %s .", sendername);
								SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
								format(string, sizeof(string), "* You drug %s .", giveplayer);
								SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
								format(string, sizeof(string), "* %s throws %s in the back of the Ambulance.", sendername ,giveplayer);
								ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
								GameTextForPlayer(giveplayerid, "~r~Dragged", 2500, 3);
								ClearAnimations(giveplayerid);
								TogglePlayerControllable(giveplayerid, 0);
								PutPlayerInVehicle(giveplayerid,carid,seat);
						   	}
							else
							{
							    SendClientMessage(playerid, COLOR_GREY, "   That player isn't Sterile !"); // for this, i have a /cuff
							    return 1;
							}
						}
						else
						{
						   SendClientMessage(playerid, COLOR_GREY, " Your not close enough to the player or your car!"); // fixed
						   return 1;
						}
					}
				}
				else
				{
				   SendClientMessage(playerid, COLOR_GREY, "   That player is Offline !");
				   return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, "   You are not a Medic");
			}
       }
       return 1;
	}


Kako od ovoga da napravim filterscriptu probao sam na nekoliko nacina ali nije uspelo...

Molim za pomoc.
Poslednja Izmena: Decembar 01, 2010, 19:37:07 POSLE PODNE od Niki
Menjam Steam 1800+ igrica za Molten WoW -Ragnaros accl! PM!!