15.06.2010, 16:48
if you mean something like "quickstrings", then: yes.
this example cuts out a "#mon", and replaces it with your actual amount of cash
iam too lazy to cut out the not-needed parts atm ^^
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); } //......