help with string
#1

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;
}
Reply
#2

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");
Reply
#3

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 :/
Reply
#4

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);
Reply
#5

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...
Reply
#6

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
Reply
#7

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
Reply
#8

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

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
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)