⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 actions.pwn

📁 GTA SAMP
💻 PWN
字号:
//----------begin------------------
// make   by [Money]CHINA = guan3411
//-----------------------------------
#pragma tabsize 0
#include <a_samp>
#include <core>
#include <float>
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_FADE1 0xE6E6E6AA
#define COLOR_FADE2 0xC8C8C8AA
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8CAA
#define COLOR_FADE5 0x6E6E6EAA
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_DBLUE 0x2641FEAA
#define COLOR_ALLDEPT 0xFF8282AA
//部分代码取于老外

public OnFilterScriptInit()//脚本初始化
{
	printf("");
	printf("");
	printf("=*= SA:MP动作脚本:读取信息成功 =*=");
	printf("=*= 本脚本由ZASAZ制作    =*=");
}
public OnFilterScriptExit()//卸载脚本
{
	printf("");
	printf("");
	printf("=*= SA:MP动作脚本:读取信息失败 =*=");
	printf("=*= 本脚本由ZASAZ制作    =*=");
}

//-------------------------------------------------
public OnPlayerConnect(playerid){

    SendClientMessage(playerid,COLOR_GREEN," =*=本服务器使用了动作辅助脚本,脚本功能请输入/acthelp查看帮助=*= ");


	return 1;
}




strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}

//-------------------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])//命令处理
{
	new cmd[256];
	new idx;
	new dancestyle;
	cmd = strtok(cmdtext, idx);
	
	if(strcmp(cmd, "/acthelp", true) == 0)
	{
          SendClientMessage(playerid,COLOR_FADE1," =*= 动作脚本帮助系统 =*=");
          SendClientMessage(playerid,COLOR_GREY," =*= 本脚本由 ZASAZ制作 =*=");
          SendClientMessage(playerid,COLOR_GREY," =*= /handsup [投降]  /drunk [醉酒] /bomb [装炸弹] /arrest [抓犯人] /laugh [笑] /lookout [眺望]=*=");
          SendClientMessage(playerid,COLOR_GREY," =*= /rob [挑衅] /winkin [sex] /winout [sex] /coparrest[逮捕犯人] /arrested [拿枪指对方]       =*=");
          SendClientMessage(playerid,COLOR_GREY," =*= /injured [受伤了] /slapped [向右看] /fsmoking [靠在一旁,吸烟] /look [看] /lay [享受]     =*=");
          SendClientMessage(playerid,COLOR_GREY," =*= /cover [抱头,蹲下] /vomit [呕吐] /eat [吃] /wave [打招呼] /slapass [打PP] /death [卧倒]  =*=");
          SendClientMessage(playerid,COLOR_GREY," =*= /deal [毒品交易] /kiss [亲嘴] /crack [装死] /piss [抚摸下方] /smoke [吸烟] /sit [坐下]    =*=");
          SendClientMessage(playerid,COLOR_GREY," =*= /fu [打招呼] /strip_A-G [肢体分解动作] /chat [闲谈] /kill [自杀] /dance1-3 [跳舞]         =*=");
          SendClientMessage(playerid,COLOR_GREY," =*= 以上都为动作.有3个不文明动作,请未成年人不使用!                                            =*=");





		  return 1;
    }


 	if(strcmp(cmd, "/handsup", true) == 0) {
		if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
		  SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
          SendClientMessage(playerid, 0xFF0000FF, " 你举起双手投降!");
          return 1;
     }
	}

    if(strcmp(cmd, "/drunk", true) == 0) {
        if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
     {
          ApplyAnimation(playerid,"PED", "WALK_DRUNK",4.0,0,1,0,0,0);
          SendClientMessage(playerid, 0xFF0000FF, " 你现在走路像喝醉了一样!"); 
          return 1;
     }
    }

    if (strcmp("/bomb", cmdtext, true) == 0) {
	      ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你正在安装炸弹!");
		  return 1;
	}

    if (strcmp("/arrest", cmdtext, true, 7) == 0) {
	      ApplyAnimation( playerid,"ped", "ARRESTgun", 4.0, 0, 0, 0, 0, 0);
          SendClientMessage(playerid, 0xFF0000FF, " 你正在抓捕犯人!");
		  return 1;
    }

    if (strcmp("/laugh", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你正在笑!");
		  return 1;
	}

    if (strcmp("/lookout", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你正在眺望!");
		  return 1;
	}

    if (strcmp("/rob", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你在挑衅!");
		  return 1;
	}

    if (strcmp("/wankin", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "PAULNMAC", "wank_loop", 4.0, 0, 0, 0, 0, 0);
          SendClientMessage(playerid, 0xFF0000FF, " 你正在自慰!");
		  return 1;
 	}

    if (strcmp("/coparrest", cmdtext, true) == 0) {
	      ApplyAnimation(playerid, "POLICE", "plc_drgbst_01", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 逮捕某人ING...");
		  return 1;
	}

    if (strcmp("/wankout", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "PAULNMAC", "wank_out", 4.0, 0, 0, 0, 0, 0);
          SendClientMessage(playerid, 0xFF0000FF, " 你正在自慰!");
		  return 1;
	}

    if (strcmp("/arrested", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "POLICE", "crm_drgbst_01", 4.0, 0, 0, 0, 0, 0);
          SendClientMessage(playerid, 0xFF0000FF, " 你拿起枪指着前方!");
		  return 1;
	}

    if (strcmp("/injured", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SWEET", "Sweet_injuredloop", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你受伤了!");
		  return 1;
	}

    if (strcmp("/slapped", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SWEET", "ho_ass_slapped", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你向右边看了看!");
		  return 1;
	}

    if (strcmp("/fsmoking", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 0, 0, 0, 0, 0);
          SendClientMessage(playerid, 0xFF0000FF, " 靠在一旁,吸烟!");
		  return 1;
	}
    if (strcmp("/look", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 0, 0, 0, 0);
          SendClientMessage(playerid, 0xFF0000FF, " 你正在看!");
		  return 1;
	}

    if (strcmp("/lay", cmdtext, true, 6) == 0) {
          ApplyAnimation(playerid,"BEACH", "bather", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你躺了下来,享受阳光");
		  return 1;
    }

    if (strcmp("/cover", cmdtext, true, 3) == 0) {
          ApplyAnimation(playerid, "ped", "cower", 3.0, 0, 0, 0, 0, 0); // 
          SendClientMessage(playerid, 0xFF0000FF, " 双手抱头, 蹲下");
		  return 1;
	}

    if (strcmp("/vomit", cmdtext, true) == 0) {
	      ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0);
          SendClientMessage(playerid, 0xFF0000FF, " 呕吐ING...");
		  return 1;
	}

    if (strcmp("/eat", cmdtext, true) == 0) {
	      ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.00, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你正在吃东西!");
		  return 1;
	}

    if (strcmp("/wave", cmdtext, true) == 0) {
	      ApplyAnimation(playerid, "KISSING", "BD_GF_Wave", 3.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 转身打了个招呼!");
		  return 1;
	}

    if (strcmp("/slapass", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你打了以下别人的屁股!");
		  return 1;
	}

    if (strcmp("/death", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 紧急情况!卧倒!");
		  return 1;
    }

    if (strcmp("/deal", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 正在进行毒品交易!");
		  return 1;
	}

    if (strcmp("/kiss", cmdtext, true, 5) == 0) {
          ApplyAnimation(playerid, "KISSING", "Playa_Kiss_02", 3.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你正在KISS!");
		  return 1;
	}

    if (strcmp("/crack", cmdtext, true, 6) == 0) {
          ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你正在装死!");
		  return 1;
	}

    if (strcmp("/piss", cmdtext, true, 8) == 0) {
          ApplyAnimation(playerid, "PAULNMAC", "Piss_in", 3.0, 0, 0, 0, 0, 0);
          SendClientMessage(playerid, 0xFF0000FF, " 你正在抚摸下方");
		  return 1;
	}

    if (strcmp("/smoke", cmdtext, true, 4) == 0) {
          ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你正在吸烟!");
		  return 1;
	}
    if (strcmp("/sit", cmdtext, true, 4) == 0) {
          ApplyAnimation(playerid,"BEACH", "ParkSit_M_loop", 4.0, 0, 0, 0, 0, 0); 
          SendClientMessage(playerid, 0xFF0000FF, " 你坐了下来!");
		  return 1;
    }

    if (strcmp("/fu", cmdtext, true, 2) == 0) {
	      ApplyAnimation( playerid,"ped", "fucku", 4.1, 0, 1, 1, 1, 1 ); 
          SendClientMessage(playerid, 0xFF0000FF, " 你正在打招呼!");
		  return 1;
    }

    if (strcmp("/strip", cmdtext, true, 6) == 0)
    {
    switch (cmdtext[7])
    {
        case 'a', 'A':{ ApplyAnimation( playerid,"STRIP", "strip_A", 4.1, 0, 1, 1, 1, 1 ); return 1; } 
        case 'b', 'B':{ ApplyAnimation( playerid,"STRIP", "strip_B", 4.1, 0, 1, 1, 1, 1 ); return 1; } 
        case 'c', 'C':{ ApplyAnimation( playerid,"STRIP", "strip_C", 4.1, 0, 1, 1, 1, 1 ); return 1; }
        case 'd', 'D':{ ApplyAnimation( playerid,"STRIP", "strip_D", 4.1, 0, 1, 1, 1, 1 ); return 1; } 
        case 'e', 'E':{ ApplyAnimation( playerid,"STRIP", "strip_E", 4.1, 0, 1, 1, 1, 1 ); return 1; }
        case 'f', 'F':{ ApplyAnimation( playerid,"STRIP", "strip_F", 4.1, 0, 1, 1, 1, 1 ); return 1; } 
        case 'g', 'G':{ ApplyAnimation( playerid,"STRIP", "strip_G", 4.1, 0, 1, 1, 1, 1 ); return 1; } 
    }   SendClientMessage(playerid, 0xFF0000FF, " 肢体分解动作!");
    return 1;
    }

    if(strcmp(cmd, "/chat", true) == 0)
{
     if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
     {
         ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,0,1,1,1,1);
         SendClientMessage(playerid, 0xFF0000FF, " 你正在和别人说话!");
         return 1;
     }
}

 	if(strcmp(cmd, "/kill", true) == 0) {
	    SetPlayerHealth(playerid,0.0);
  	  	return 1;
	}
	

 	if(strcmp(cmd, "/dance", true) == 0) {
		if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
		    new tmp[256];
		    

      		tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) {
				SendClientMessage(playerid,0xFF0000FF,"使用方法: /dance [style 1-3]");
				return 1;
			}
			
			dancestyle = strval(tmp);
			if(dancestyle < 1 || dancestyle > 3) {
			    SendClientMessage(playerid,0xFF0000FF,"使用方法: /dance [style 1-3]");
			    return 1;
			}
			
			if(dancestyle == 1) {
			    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
			} else if(dancestyle == 2) {
			    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
			} else if(dancestyle == 3) {
			    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
			}
 	  		return 1;
	 }
	}
	return 0;
    }
//-----------------------------------END---------------------------by  [Money]CHINA--------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -