SA-MP Forums Archive
Custom Accent - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Custom Accent (/showthread.php?tid=424606)



Custom Accent - Nivniv2 - 23.03.2013

Can edit it so when people doing /accent they would be able to choose customly?
like: /accent [anything]

Код:
CMD:accent(playerid, params[])
{
	new accent;
	if(sscanf(params, "d", accent))
	{
		SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /accent [accent ID]");
		SendClientMessageEx(playerid, COLOR_GRAD2, "Available Names: Normal [1], British [2], Asian [4], Scottish [6], Irish [7], Russian [8]");
		SendClientMessageEx(playerid, COLOR_GRAD2, "Available Accents: American [9], Spanish [10], Southern [11], Italian [13], Gangsta [14], Australian [15]");
		SendClientMessageEx(playerid, COLOR_GRAD2, "Available Accents: Arabic [16], Balkan [17], Canadian [18] Jamaican [19] Israeli [20]");
		return 1;
	}

	switch(accent)
	{
	case 1:
		{
			PlayerInfo[playerid][pAccent] = 1;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Normal accent, use /accent to change it." );
		}
	case 2:
		{
			PlayerInfo[playerid][pAccent] = 2;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the British accent, use /accent to change it." );
		}
	case 3:
		{
			PlayerInfo[playerid][pAccent] = 3;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Japanese accent, use /accent to change it." );
		}
	case 4:
		{
			PlayerInfo[playerid][pAccent] = 4;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Chinese accent, use /accent to change it." );
		}
	case 5:
		{
			PlayerInfo[playerid][pAccent] = 5;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Korean accent, use /accent to change it." );
		}
	case 6:
		{
			PlayerInfo[playerid][pAccent] = 6;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Scottish accent, use /accent to change it." );
		}
	case 7:
		{
			PlayerInfo[playerid][pAccent] = 7;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Irish accent, use /accent to change it." );
		}
	case 8:
		{
			PlayerInfo[playerid][pAccent] = 8;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Russian accent, use /accent to change it." );
		}
	case 9:
		{
			PlayerInfo[playerid][pAccent] = 9;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the American accent, use /accent to change it." );
		}
	case 10:
		{
			PlayerInfo[playerid][pAccent] = 10;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Mexican accent, use /accent to change it." );
		}
	case 11:
		{
			PlayerInfo[playerid][pAccent] = 11;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Texan accent, use /accent to change it." );
		}
	case 12:
		{
			PlayerInfo[playerid][pAccent] = 12;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Cuban accent, use /accent to change it." );
		}
	case 13:
		{
			PlayerInfo[playerid][pAccent] = 13;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Italian accent, use /accent to change it." );
		}
	case 14:
		{
			PlayerInfo[playerid][pAccent] = 14;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Gangsta accent, use /accent to change it." );
		}
	case 15:
		{
			PlayerInfo[playerid][pAccent] = 15;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Australian accent, use /accent to change it." );
		}
	case 16:
		{
			PlayerInfo[playerid][pAccent] = 16;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Arabic accent, use /accent to change it." );
		}
	case 17:
		{
			PlayerInfo[playerid][pAccent] = 17;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Balkan accent, use /accent to change it." );
		}
	case 18:
		{
			PlayerInfo[playerid][pAccent] = 18;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Canadian accent, use /accent to change it." );
		}
	case 19:
		{
			PlayerInfo[playerid][pAccent] = 19;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Jamaican accent, use /accent to change it." );
		}
	case 20:
		{
			PlayerInfo[playerid][pAccent] = 20;
			SendClientMessageEx(playerid, COLOR_WHITE, "You will now speak in the Israeli accent, use /accent to change it." );
		}
	}
	return 1;
}



Re: Custom Accent - faff - 23.03.2013

pawn Код:
CMD:accent(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(sscanf(params, "s[16]", params))
    {
        SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /accent [accent]");
        SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /accent none - to remove your accent!");
        return 1;
    }
    if(!strcmp(params, "none"))
    {
        format(PlayerInfo[playerid][pAccent], 16, "");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, " You are not using any accent now.");
    }
    else{
    PlayerInfo[playerid][pAccent] = params;}
    return 1;
}



Re: Custom Accent - Glad2BeHere - 23.03.2013

pawn Код:
CMD:accent(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(sscanf(params, "s[16]", params))
    {
        SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /accent [accent]");
        return 1;
    }
    format(PlayerInfo[playerid][pAccent], 16, "%s", params);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "You Change Your Accent";
    return 1;
}



Re: Custom Accent - Nivniv2 - 23.03.2013

Quote:
Originally Posted by faff
Посмотреть сообщение
pawn Код:
CMD:accent(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(sscanf(params, "s[16]", params))
    {
        SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /accent [accent]");
        SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /accent none - to remove your accent!");
        return 1;
    }
    if(!strcmp(params, "none"))
    {
        format(PlayerInfo[playerid][pAccent], 16, "");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, " You are not using any accent now.");
    }
    else{
    PlayerInfo[playerid][pAccent] = params;}
    return 1;
}
and what to do here?
i want it to be like "(-accent- Accent) Test says:"

Код:
	switch(PlayerInfo[playerid][pAccent])
	{
		case 0, 1:
		{
			format(string, sizeof(string), "%s says: %s", sendername, text);
			ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
	}



Re: Custom Accent - faff - 24.03.2013

Easy.

pawn Код:
switch(PlayerInfo[playerid][pAccent])
    {
        case 0, 1:
        {
                        new accent;
                        accent = PlayerInfo[playerid][pAccent];
            format(string, sizeof(string), "%s says %s Accent: %s", sendername, text, accent);
            ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
    }



Re: Custom Accent - Mando - 24.03.2013

No 'Rep for Faff here?
Damn'
Hit up that Rep for Faff