SA-MP Forums Archive
help with string - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help with string (/showthread.php?tid=185678)



help with string - dark_clown - 25.10.2010

humm how can i make this when he changes the it sends a string to the player
who changed the fighting style, it may be easy but i cant figure it out how.
iv tryed but :/ no luck
Код:
dcmd_fightstyle(playerid,params[])
{
	new string[100];
    if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid, red, "ERROR: You must be level 3");
    if(strlen(params) == 0) return SendClientMessage(playerid, ORANGE, "USAGE: /fightstyle [normal/boxing/kungfu/kneehead/grabkick/elbow]");
    if(!strcmp(params, "normal", true))
	{
		SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
	}
	if(!strcmp(params, "boxing", true))
	{
 		SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
	}
	if(!strcmp(params, "kungfu", true))
	{
 		SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
	}
	if(!strcmp(params, "kneehead", true))
	{
 		SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
	}
	if(!strcmp(params, "grabkick", true))
	{
 		SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
	}
	if(!strcmp(params, "elbow", true))
	{
 		SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
	}
	return 1;
}



Re: help with string - Zezombia - 25.10.2010

I'm not sure what you mean exactly. From what I can tell, all you want is a SendClientMessage when the fighting style is changed. Such as:

pawn Код:
SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
SendClientMessage(playerid, ORANGE, "Hai you just changed your fighting style");



Re: help with string - dark_clown - 25.10.2010

Quote:
Originally Posted by Zezombia
Посмотреть сообщение
I'm not sure what you mean exactly. From what I can tell, all you want is a SendClientMessage when the fighting style is changed. Such as:

pawn Код:
SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
SendClientMessage(playerid, ORANGE, "Hai you just changed your fighting style");
lol, i mean when he changed it sends a string saying
format(string...... "you have changed your fighting style to %s, GetPlayerFightingStyle" but when i do that it just
sends on %s = fightingstyle in game, its hard to explain, but i want the %s to be the fighting style that he changed ex:
you have just changed your fighting style to kungfu
but :/


Re: help with string - Zezombia - 25.10.2010

pawn Код:
SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);

new string[128];
format(string, sizeof(string), "You have changed your fighting style to %s", params);
SendClientMessage(playerid, ORANGE, string);



Re: help with string - Scripter123 - 25.10.2010

Why you dont post funtions in ******, and use a bit of WIKI?

pawn Код:
if(GetPlayerFightingStyle(playerid) == FIGHT_STYLE_NORMAL)
{
    SendClientMessage(playerid,0xFFFFFFAA,"You are using normal fighting style!");
}

I think this is good...


Re: help with string - dark_clown - 25.10.2010

Quote:
Originally Posted by Scripter123
Посмотреть сообщение
Why you dont post funtions in ******, and use a bit of WIKI?

pawn Код:
if(GetPlayerFightingStyle(playerid) == FIGHT_STYLE_NORMAL)
{
    SendClientMessage(playerid,0xFFFFFFAA,"You are using normal fighting style!");
}

I think this is good...
i came with changing fighting style from there and that didnt help DAHHH lol zezombia thanks


Re: help with string - Scripter123 - 25.10.2010

Quote:
Originally Posted by dark_clown
Посмотреть сообщение
i came with changing fighting style from there and that didnt help DAHHH lol zezombia thanks
Reported to admin, and next time if you wan't help i will not respond you.
You readded how to ask help?

in the last line it says:


BE NICE AND SAY THANKS


Re: help with string - Zezombia - 25.10.2010

No offence Scripter123, but learn a little more about PAWN language, answer questions you know how to answer, and grow up a little.


Re: help with string - dark_clown - 25.10.2010

Quote:
Originally Posted by Scripter123
Посмотреть сообщение
Reported to admin, and next time if you wan't help i will not respond you.
You readded how to ask help?

in the last line it says:


BE NICE AND SAY THANKS
well i was nice i sayed thanks and i didnt offend you i just sayed it didnt help


Re: help with string - Scripter123 - 25.10.2010

Quote:
Originally Posted by Zezombia
Посмотреть сообщение
No offence Scripter123, but learn a little more about PAWN language, answer questions you know how to answer, and grow up a little.
I tried to help, always people dont know how to code, but try to help with leatle codes....


ty too zezombia