pickup...
#8

Код:
f(!strcmp(cmdtext, "/cuff", true,4))
	{
 		if(playerDB[playerid][specialybe]!=1){SendClientMessage(playerid,sviesiaigeltona,"* This command only for cops"); return 1;}
 		if(cmdtext[4]==0){SendClientMessage(playerid,melyna,"* cuff player /cuff [partofname]"); return 1;}
 		new vardas[MAX_PLAYER_NAME];
 		strmid(vardas,cmdtext[5],0,MAX_PLAYER_NAME);
  	new id = GetPlayeridMid(vardas);
		if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, melyna, "* Wrong name."); return 1;}
		if (id == playerid){ SendClientMessage(playerid, melyna, "* You can't cuff yourself"); return 1;}
		new Float:Coo[3];
		GetPlayerPos(id,Coo[0],Coo[1],Coo[2]);
		if(!PlayerToPoint(3, playerid, Coo[0],Coo[1],Coo[2])){SendClientMessage(playerid, melyna, "* Player too far."); return 1;}
		
		new msg[128],police[MAX_PLAYER_NAME];
		GetPlayerName(playerid,police,sizeof(police));
		GetPlayerName(id,vardas,sizeof(vardas));
		
		if(playerDB[id][cuffed])
		{
		  playerDB[id][cuffed]=false;
		  TogglePlayerControllable(id,false);
		  
		  format(msg,sizeof(msg),"cuffed %s.",vardas);
			SendClientMessage(playerid,melyna,msg);
			
			format(msg,sizeof(msg)," you've been cuffed by %s .",police);
			SendClientMessage(id,melyna,msg);
		  
		}else{
		  playerDB[id][cuffed]=true;
		  TogglePlayerControllable(id,true);

		  format(msg,sizeof(msg),"Uncuff %s.",vardas);
			SendClientMessage(playerid,melyna,msg);

			format(msg,sizeof(msg),"you'v been uncuffed by %s.",police);
			SendClientMessage(id,melyna,msg);
		
		}
  		return 1;
 	}
Код:
if(strcmp(cmdtext, "/pickup", true)==0)
	{
	new vardas[MAX_PLAYER_NAME];
	new id = GetPlayeridMid(vardas);
	if(playerDB[id][cuffed])
	{
		SendClientMessage(playerid,zalia, "You're cuffed");
		return 1;
	}
	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP); 
	return 1;
	}
Sorry for sintacs error, i've tried to translate to english
Reply


Messages In This Thread
pickup... - by lakierka - 29.06.2009, 09:52
Re: pickup... - by ledzep - 29.06.2009, 09:56
Re: pickup... - by gytisx - 29.06.2009, 09:58
Re: pickup... - by lakierka - 29.06.2009, 10:13
Re: pickup... - by Nero_3D - 29.06.2009, 10:20
Re: pickup... - by dice7 - 29.06.2009, 10:21
Re: pickup... - by ledzep - 29.06.2009, 10:22
Re: pickup... - by lakierka - 29.06.2009, 10:33
Re: pickup... - by dice7 - 29.06.2009, 10:57
Re: pickup... - by lakierka - 29.06.2009, 11:01

Forum Jump:


Users browsing this thread: 2 Guest(s)