Halp man!
#1

Hello I am trying to add this after my #includes. I am trying to ad some Auto Messages but I get come errors.
My AutoMessages I am trying to add:
pawn Код:
new AutoMessages[][] = { // Messages need to be changed/added.
    "Want to donate to help our community stay alive, then ask an admin",
    "No admins on and you want to report someone? Make a player complaint on our forums!",
    "Check out our forums at compress-gaming.tk",
    "Donate to recieve certain rewards! It's a great way to fullen your experience!",
    "Please note that if you are having account issues to make an administrative request on our forums!",
    "We have a zero tolerancy rule for server advertising and hacking.",
    "Remember at all times on the server you MUST Roleplay.",
    "Please remember to send donations to Harsh or Yuvi only!",
    "Use /information to view our current information about our server.",
    "Don't ask for become an Admin. You earn it by going through Helper, and all the other Staff Ranks.",
    "Looking for some visual help? You may /requesthelp and an Advisor will be with you shortly.",
    "Wanting to become a Helper? Help around on /new and the Chief Advisor will notice you."
    "Need Script Relating Help ? Use /n for the Newbie Chat!"
};
And the ERRORS I get:
pawn Код:
F:\UP COMPUTER\HARSHPREET SINGH NIJHAR\SA-MP (SERVER)\CG-RP\gamemodes\CG-RP.pwn(50) : error 001: expected token: ";", but found "-string-"
F:\UP COMPUTER\HARSHPREET SINGH NIJHAR\SA-MP (SERVER)\CG-RP\gamemodes\CG-RP.pwn(51) : error 010: invalid function or declaration
F:\UP COMPUTER\HARSHPREET SINGH NIJHAR\SA-MP (SERVER)\CG-RP\gamemodes\CG-RP.pwn(93543) : warning 203: symbol is never used: "AutoMessages"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Also tell me where Should I place these messages in the script. I am trying to add after my #includes.
SO yeah, help me guys ;P
Reply
#2

On top//
pawn Код:
new messagenumber = 0;

new messages[][] = { // Messages need to be changed/added.
    "Want to donate to help our community stay alive, then ask an admin",
    "No admins on and you want to report someone? Make a player complaint on our forums!",
    "Check out our forums at compress-gaming.tk",
    "Donate to recieve certain rewards! It's a great way to fullen your experience!",
    "Please note that if you are having account issues to make an administrative request on our forums!",
    "We have a zero tolerancy rule for server advertising and hacking.",
    "Remember at all times on the server you MUST Roleplay.",
    "Please remember to send donations to Harsh or Yuvi only!",
    "Use /information to view our current information about our server.",
    "Don't ask for become an Admin. You earn it by going through Helper, and all the other Staff Ranks.",
    "Looking for some visual help? You may /requesthelp and an Advisor will be with you shortly.",
    "Wanting to become a Helper? Help around on /new and the Chief Advisor will notice you.",
    "Need Script Relating Help ? Use /n for the Newbie Chat!"
// you may add more msgs but you must put "," in 2nd last line
};
Put where you want:
pawn Код:
forward RandomMessage();
public RandomMessage()
{
    if(messagenumber == sizeof(messages)) messagenumber = 0;
    SendClientMessageToAll(orange, messages[messagenumber]);
    messagenumber++;
    return 1;
}
//under OnGameModeInit
pawn Код:
SetTimer("RandomMessage", 50000, true); // current time 2.5 second
Reply
#3

Quote:
Originally Posted by Raza2013
Посмотреть сообщение
On top//
pawn Код:
new messagenumber = 0;

new messages[][] = { // Messages need to be changed/added.
    "Want to donate to help our community stay alive, then ask an admin",
    "No admins on and you want to report someone? Make a player complaint on our forums!",
    "Check out our forums at compress-gaming.tk",
    "Donate to recieve certain rewards! It's a great way to fullen your experience!",
    "Please note that if you are having account issues to make an administrative request on our forums!",
    "We have a zero tolerancy rule for server advertising and hacking.",
    "Remember at all times on the server you MUST Roleplay.",
    "Please remember to send donations to Harsh or Yuvi only!",
    "Use /information to view our current information about our server.",
    "Don't ask for become an Admin. You earn it by going through Helper, and all the other Staff Ranks.",
    "Looking for some visual help? You may /requesthelp and an Advisor will be with you shortly.",
    "Wanting to become a Helper? Help around on /new and the Chief Advisor will notice you.",
    "Need Script Relating Help ? Use /n for the Newbie Chat!"
};
Put where you want:
pawn Код:
forward RandomMessage();
public RandomMessage()
{
    if(messagenumber == sizeof(messages)) messagenumber = 0;
    SendClientMessageToAll(orange, messages[messagenumber]);
    messagenumber++;
    return 1;
}
//under OnGameModeInit
pawn Код:
SetTimer("RandomMessage", 50000, true);
This should work.
Reply
#4

show us your 50 , 51 line press ctrl + g and type 50 in it and copy that line paste it here.... and about that last error its cuz you didnt use that announcement variable, you can use that in timer so that it repeats and shows the messages again and again. If you want random messages to be shown up you can do something like

pawn Код:
public OnGameModeInit()
{
      SetTimer("AnnouncementMessages",60000,1);
      return 1;
}
forward AnnouncementMessages();
public AnnouncementMessages()
{
      new rand = random(sizeof(AutoMessages));
      SendClientMessageToAll(0xFF0000FF,AutoMessages[rand]);
      return 1;
}
Reply
#5

hmm bro i dont think i've explained wrong
Reply
#6

Quote:
Originally Posted by Raza2013
Посмотреть сообщение
//under OnGameModeInit
pawn Код:
SetTimer("RandomMessage", 50000, true); // current time 2.5 second
I don't get this part, Rest I done but what do you mean by this ? Where do I put it ?
Reply
#7

did you defined?
Reply
#8

pawn Код:
new AutoMessages[][] = { // Messages need to be changed/added.
    "Want to donate to help our community stay alive, then ask an admin", //< comma
    "No admins on and you want to report someone? Make a player complaint on our forums!",//< comma
    "Check out our forums at compress-gaming.tk",//< comma
    "Donate to recieve certain rewards! It's a great way to fullen your experience!",//< comma
    "Please note that if you are having account issues to make an administrative request on our forums!",//< comma
    "We have a zero tolerancy rule for server advertising and hacking.",//< comma
    "Remember at all times on the server you MUST Roleplay.",//< comma
    "Please remember to send donations to Harsh or Yuvi only!",//< comma
    "Use /information to view our current information about our server.",//< comma
    "Don't ask for become an Admin. You earn it by going through Helper, and all the other Staff Ranks.",//< comma
    "Looking for some visual help? You may /requesthelp and an Advisor will be with you shortly.",//< comma
    "Wanting to become a Helper? Help around on /new and the Chief Advisor will notice you."//< ??? where the heck is comma here?
    "Need Script Relating Help ? Use /n for the Newbie Chat!"
};
Reply
#9

new AutoMessages[][] = { // Messages need to be changed/added.
{
"Want to donate to help our community stay alive, then ask an admin", //< comma
"No admins on and you want to report someone? Make a player complaint on our forums!",//< comma
"Check out our forums at compress-gaming.tk",//< comma
"Donate to recieve certain rewards! It's a great way to fullen your experience!",//< comma
"Please note that if you are having account issues to make an administrative request on our forums!",//< comma
"We have a zero tolerancy rule for server advertising and hacking.",//< comma
"Remember at all times on the server you MUST Roleplay.",//< comma
"Please remember to send donations to Harsh or Yuvi only!",//< comma
"Use /information to view our current information about our server.",//< comma
"Don't ask for become an Admin. You earn it by going through Helper, and all the other Staff Ranks.",//< comma
"Looking for some visual help? You may /requesthelp and an Advisor will be with you shortly.",//< comma
"Wanting to become a Helper? Help around on /new and the Chief Advisor will notice you."//< where the heck is comma here?
"Need Script Relating Help ? Use /n for the Newbie Chat!"
};
Reply
#10

I did all the rest you told me to do, But where do I put this Under Gamemodeonit ? I am confused. WHere do I put the last part ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)