[Tutorial] Detailing in dialogs - Easy For Newbies
#4

Nice tutorial. I would recommend using an enum to store dialog names. If you just use an ID, there's a chance you'll accidentally use that ID again and that can be confusing.



https://sampwiki.blast.hk/wiki/ShowPlayerDialog

- It's possible to declare just one string variable and re-format it multiple times (So there's no need for string2, string3 etc. unless you know one string might become longer than the other one. For example, the string length of a textdraw can be 1024 characters and the string in SendClientMessage can only be up to 144 characters)

Example:
Код:
format(string, sizeof(string), "You've been kicked by Admin %s | Reason: %s", PlayerInfo[playerid][Name], reason);
SendClientMessage(targetid, -1, string);
KickEx(targetid);
format(string, sizeof(string), "You've kicked %s | Reason: %s", PlayerInfo[targetid][Name], reason);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "%s has been kicked by Admin %s | Reason: %s", PlayerInfo[targetid][Name], PlayerInfo[playerid][Name], reason);
SendClientMessageToAll(-1, string);
https://sampwiki.blast.hk/wiki/Limits
Reply


Messages In This Thread
Detailing in dialogs - Easy For Newbies - by Karan007 - 30.10.2015, 08:06
Re: Detailing in dialogs - Easy For Newbies - by Ritzy2K - 30.10.2015, 08:14
Re: Detailing in dialogs - Easy For Newbies - by iKarim - 30.10.2015, 08:25
Re: Detailing in dialogs - Easy For Newbies - by MartinSwag - 30.10.2015, 08:42
Re: Detailing in dialogs - Easy For Newbies - by Karan007 - 30.10.2015, 09:04
Re: Detailing in dialogs - Easy For Newbies - by Sudaisx - 30.10.2015, 09:10
Re: Detailing in dialogs - Easy For Newbies - by Karan007 - 30.10.2015, 11:45
Re: Detailing in dialogs - Easy For Newbies - by HydraHumza - 30.10.2015, 13:07
Re: Detailing in dialogs - Easy For Newbies - by Karan007 - 30.10.2015, 16:03

Forum Jump:


Users browsing this thread: 2 Guest(s)