Is it possible to do this?
#2

if you mean something like "quickstrings", then: yes.
this example cuts out a "#mon", and replaces it with your actual amount of cash
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	new string1[128],string2[128],result[128];
	new found;
	found=strfind(cmdtext[0],"#mon",true);
	if(found>-1)
	{
		strmid(string1,cmdtext,0,found);
		strmid(string2,cmdtext,found+4,128);
		format(result,sizeof(result),"%s%d%s",string1,GetPlayerMoney(playerid),string2);
		SetPlayerChatBubble(playerid,result,CHAT_CIV_COLOR[GetPVarInt(playerid,"WantedLevel")],100.0,10000);
		SendClientMessageToAll(CHAT_CIV_COLOR[GetPVarInt(playerid,"WantedLevel")],result);
	}
//......
iam too lazy to cut out the not-needed parts atm ^^
Reply


Messages In This Thread
Is it possible to do this? - by NewTorran - 15.06.2010, 11:10
Re: Is it possible to do this? - by Babul - 15.06.2010, 16:48
Re: Is it possible to do this? - by NewTorran - 15.06.2010, 17:01
Re: Is it possible to do this? - by Babul - 15.06.2010, 17:04

Forum Jump:


Users browsing this thread: 1 Guest(s)