#1

Hello,

I wanted to know how I can get from a file with dini_Get. Only certain infromation. explanation :

[11.9.2015 23:7:32] Example has been banned by Administrator example [Reason: reason] [Date: 11/9/2015] [Time: 23:7]

I want to get only the reason in a string how can I do that ?

Thanks !
Reply
#2

PHP код:
new pname[MAX_PLAYER_NAME], pname2[MAX_PLAYER_NAME]; 
That is to define the players name
Now lets get the players name
PHP код:
GetPlayerName(playeridpnameMAX_PLAYER_NAME);
GetPlayerName(targetplayerpname2MAX_PLAYER_NAME); 
Now we have their names, now we have to use the format
PHP код:
format(stringsizeof string"%s has been banned by Administrator %s"pname2pname); 
the %s is the players name. after the "," I have defined the players name.
I hope you'll understand this.

Note: You have to define the string either, but I just explained you the name part.

Edit: Oh shit lol, I just noticed you just wanted the reason.
Well that's kinda the same shit
PHP код:
new reason[75]; 
PHP код:
if(sscanf(params"s"reason)) return SCM(blablabla); 
PHP код:
format(stringsizeof string"%s has been banned by %s [%s]"pname2pnamereason); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)