Litte help..
#1

Hello!!!!!

I want the same command like this picture below with zcmd



NOTE: This white colour means that it's deleted. So, add the other things that are written

Thanks,

+REP from me if you could help me a little bit!
Reply
#2

Please? Sorry for bumping.
Reply
#3

PHP код:
#define DIALOG_COMMANDS 1
CMD:commands(playeridparams[])
{
    new 
string[1050];
    
format(string,sizeof(string), "%s{FFFFFF}Register: /register [password]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Change your password: /changepass [new password]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Server rules: /rules\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To report a player: /report [playerid] [reason]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Your inventory: /inventory\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Stats: /stats or /stats [ID]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Reset your stats (kills and deaths) /resetstats\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Online Admins: /admins | Server staffs: /serverstaffs\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Scripters: /scripters\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Slap a player: /slap [playerid] [reason]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To commit suicide: /kill\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To have sex with another player type /sex\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Fix your house, business and cars: /playerfix [ID]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Morning: /morning | Night: /night | /time | /fstyles | /class\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Duel: /duel | /countdown\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Laser: /laseron | /laseroff | /lasercol\n"string);
    
format(string,sizeof(string), "%s{FFFF00}Chat Commands\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To talk about yourself: /me | To Whisper to people in your vehicle: /cw\n\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Buy a skin by typing /buyskin\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To see the list of your vehicles or player vehicle, use /cars or /cars [ID]\n\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To see the list of people who contributed to the script, type /credits"string);
    
ShowPlayerDialog(playeridDIALOG_COMMANDSDIALOG_STYLE_MSGBOX"{FFFF00}General Commands{FFFFFF}"string"Ok""");
    
    
    return 
1;

Reply
#4

Код:
C:\Users\ўггелпт\Desktop\NFTDM\gamemodes\NFTDM[3z].pwn(21794) : error 029: invalid expression, assumed zero
C:\Users\ўггелпт\Desktop\NFTDM\gamemodes\NFTDM[3z].pwn(21794) : warning 215: expression has no effect
C:\Users\ўггелпт\Desktop\NFTDM\gamemodes\NFTDM[3z].pwn(21794) : warning 215: expression has no effect
C:\Users\ўггелпт\Desktop\NFTDM\gamemodes\NFTDM[3z].pwn(21794) : warning 215: expression has no effect
C:\Users\ўггелпт\Desktop\NFTDM\gamemodes\NFTDM[3z].pwn(21794) : warning 215: expression has no effect
C:\Users\ўггелпт\Desktop\NFTDM\gamemodes\NFTDM[3z].pwn(21794) : warning 215: expression has no effect
C:\Users\ўггелпт\Desktop\NFTDM\gamemodes\NFTDM[3z].pwn(21794) : error 001: expected token: ";", but found ")"
C:\Users\ўггелпт\Desktop\NFTDM\gamemodes\NFTDM[3z].pwn(21794) : error 029: invalid expression, assumed zero
C:\Users\ўггелпт\Desktop\NFTDM\gamemodes\NFTDM[3z].pwn(21794) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#5

Try using strcat
Reply
#6

I have tested this working fine for me post line 21794
Reply
#7

deleted.
Reply
#8

I don't post any code without testing
Reply
#9

Sorry, my fault. Relax I just forgot the #define DIALOG_COMMANDS 1 The "1". Thanks! +REP!
Reply
#10

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
PHP код:
#define DIALOG_COMMANDS 1
CMD:commands(playeridparams[])
{
    new 
string[1050];
    
format(string,sizeof(string), "%s{FFFFFF}Register: /register [password]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Change your password: /changepass [new password]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Server rules: /rules\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To report a player: /report [playerid] [reason]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Your inventory: /inventory\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Stats: /stats or /stats [ID]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Reset your stats (kills and deaths) /resetstats\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Online Admins: /admins | Server staffs: /serverstaffs\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Scripters: /scripters\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Slap a player: /slap [playerid] [reason]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To commit suicide: /kill\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To have sex with another player type /sex\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Fix your house, business and cars: /playerfix [ID]\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Morning: /morning | Night: /night | /time | /fstyles | /class\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Duel: /duel | /countdown\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Laser: /laseron | /laseroff | /lasercol\n"string);
    
format(string,sizeof(string), "%s{FFFF00}Chat Commands\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To talk about yourself: /me | To Whisper to people in your vehicle: /cw\n\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}Buy a skin by typing /buyskin\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To see the list of your vehicles or player vehicle, use /cars or /cars [ID]\n\n"string);
    
format(string,sizeof(string), "%s{FFFFFF}To see the list of people who contributed to the script, type /credits"string);
    
ShowPlayerDialog(playeridDIALOG_COMMANDSDIALOG_STYLE_MSGBOX"{FFFF00}General Commands{FFFFFF}"string"Ok""");
    
    
    return 
1;

Why format though? Since there aren't any values that you're inserting (other than the first %s to add to the string), you should use strcat. It's much faster.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)