• Welcome to Vice City Multiplayer.
 

how to add an ann welcome in my server with gups v16a

Started by [KiLLeR]hussen, January 28, 2011, 06:42:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[KiLLeR]hussen

hello guys,
i wanna add a welcome script when someone joins my server
example: welcome to blablabla server....
help plz,
thnx for all :D

Pawno

Put in. public OnPlayerConnect(playerid) GameTextForPlayer(playerid,"Welcome"); you can take the default color "pink" for others it is just you get this link > http://famp.ru/wiki/GameTextCodes example

public OnPlayerConnect(playerid)
{
   ServerInfo[0][Countx] = 3;
   SetWaterLevel(6.0);
   SetGamespeed(100);
   SetGravity(100);
   SetPlayerMoney(playerid,0);
   GetPlayerName(playerid,gPlayers[playerid],MAX_PLAYER_NAME);
   
   PlayerInfo[playerid][Spawned] = 0;
   new string[256];
   format(string,256,"** [%d] %s has joined the server.",playerid,gPlayers[playerid]);
   print(string);
   format(string,256,"3** [%d] %s has joined the server.",playerid,gPlayers[playerid]);
   SendToIRC(string);

   format(file, sizeof(file), USERS_FILE, gPlayers[playerid]);
   new loggedin, lluip[256], IP[256]; loggedin = dini_Int(file, "Login"), lluip = dini_Get(file, "Ip");
   if(dini_Exists(file)) {
       if (loggedin == 1 && CompariseIp(playerid) == 1) {
         new level, stats, nogoto, noloc, cash, szMsg[256];
         level = dini_Int(file, "Level");
         stats = dini_Int(file, "Stats");
         nogoto = dini_Int(file, "NoGoto");
         noloc = dini_Int(file, "NoLoc");
         cash = dini_Int(file, "Cash");
         GetPlayerIp(playerid,IP,256);

         PlayerInfo[playerid][Logged] = 1;
         PlayerInfo[playerid][Level] = level;
         PlayerInfo[playerid][Stats] = stats;
         PlayerInfo[playerid][NoGoto] = nogoto;
         PlayerInfo[playerid][NoLoc] = noloc;
                        GameTextForPlayer(playerid,"Welcome to blablabla server");
         SendClientMessage(playerid,COLOR_GREEN,"You have auto-loged in!");
         format(szMsg,sizeof(szMsg),"Nick:[ %s ] Level:[ %d ] Status:[ %s ]",gPlayers[playerid],level,StatusTag(level));
         SendClientMessage(playerid,COLOR_GREEN,szMsg);
         SetPlayerMoney(playerid,0);
         SetPlayerMoney(playerid,cash);
      }
      else {
         SendClientMessage(playerid, COLOR_GREEN, "Please login to this account!");
         SendClientMessage(playerid, COLOR_GREEN, "USAGE: /c login [Password]");
         PlayerInfo[playerid][Logged] = 0;
      }
   }
   else {
                GameTextForPlayer(playerid,"Welcome to blablabla server");
      SendClientMessage(playerid, COLOR_GREEN, "Your nick is not registered. Please register to protect it!");
      SendClientMessage(playerid, COLOR_GREEN, "USAGE: /c register [Password]");
      PlayerInfo[playerid][Logged] = 2;
      PlayerInfo[playerid][Stats] = 2;
   }
   return 1;
}

Robd

instead of doing it after IfDini exists you could just add it near setgrav just to have a less confusing script
Hello, this is Robd from the past.
If you are seeing this I have either posted something stupid, forgotten something, started a stupid topic, or a combination of the three.

Please forgive us for this mistake.

Regards, management

yazeen

simple

public OnPlayerConnect(playerid)
{
ServerInfo[0][Countx] = 3;
SetWaterLevel(6.0);
SetGamespeed(100);


on this line add this

public OnPlayerConnect(playerid)

public OnPlayerConnect(playerid)
{
    [color=red]GameTextForPlayer(playerid,"Welcome to EXTREME RPG!",5000,5);[/color]
ServerInfo[0][Countx] = 3;
SetWaterLevel(6.0);
SetGamespeed(100);

BIG[H]

Quotepublic OnPlayerConnect(playerid)
{
    GameTextForPlayer(playerid,"Welcome to EXTREME RPG!",5000,5);
   ServerInfo[0][Countx] = 3;
   SetWaterLevel(6.0);
   SetGamespeed(100);

O_o at color


it should be

Quotepublic OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"Welcome to my Server Name here",5000,5);
   ServerInfo[0][Countx] = 3;
   SetWaterLevel(6.0);
   SetGamespeed(100);
}

u have to add this
Quote
GameTextForPlayer(playerid,"Welcome to my Server Name here",5000,5);
My Guru FORUM MUST VISITmegavcmp.freeforums.org

BIG[H] = BIG HaLL

Robd

To change color u can use the color codes on the wiki here
Hello, this is Robd from the past.
If you are seeing this I have either posted something stupid, forgotten something, started a stupid topic, or a combination of the three.

Please forgive us for this mistake.

Regards, management

[KiLLeR]hussen