When someone joins , join message is bugged -
Oscii - 10.06.2012
Hello.
This is the code
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && playerid != i)
{
if(PlayerInfo[i][pAdmin] > 1)
{
SendClientMessage(i,COLOR_GREEN,string);
if(SendIP == 1)
{
SendClientMessage(i,COLOR_GREEN,string2);
SendIP = 0;
}
}
else
{
format(string,sizeof(string),"%s(%d) has joined.", plname, playerid);
SendClientMessageToAll(COLOR_VIOLET,string);
}
}
}
When someone joins, depending on the players it multiplies
like
[name] has joined united kingdom rp <-- 1/2 players
[name] has joined united kingdom rp
[name] has joined united kingdom rp <--- 3/4 players..
[name] has joined united kingdom rp
Im not sure what makes that happen...
Re: When someone joins , join message is bugged -
Elysian` - 10.06.2012
Use this(10x better):
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[128];
format(string, sizeof(string), "%s has joined United Kingdom RP!", plname);
return 1;
}
Re: When someone joins , join message is bugged -
Oscii - 10.06.2012
Oh, Alright. Thank you!
Re: When someone joins , join message is bugged -
Rudy_ - 10.06.2012
pawn Код:
public OnPlayerConnect(playerid)
{
new string[128];
format(string, sizeof(string), "%s has joined United Kingdom RP!", plname);
return 1;
}
it's on player connect
Re: When someone joins , join message is bugged -
Oscii - 10.06.2012
Wait, why is it on OnPlayerText?
Re: When someone joins , join message is bugged -
Elysian` - 10.06.2012
Sorry I wasn't thinking >.<
Re: When someone joins , join message is bugged -
Oscii - 10.06.2012
When i do that
i get
[pawn]
error 017: undefined symbol "string"
error 017: undefined symbol "string"
[pawn] it said it was already defined when i had the 'new string[128];'
Re: When someone joins , join message is bugged -
Cell_ - 10.06.2012
Just ignore all of them. They are trying to fuck your server.
Windows32 doesn't even know what he is doing.
Mr. Rudy"_" is just copy/pasting.
pawn Код:
public
OnPlayerConnect(playerid)
{
new
string[128],
nameoftheplayerhaha[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, nameoftheplayerhaha, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s (%d) has joined YOUR SERVER NAME HERE", nameoftheplayerhaha, playerid);
SendClientMessageToAll(-1, string); // You don't simply send message to all in role play servers
}
Use this. You have to edit things according to your need though.
Just for a quick note, OnPlayerText is called when a player writes something in the chat box and presses enter. Sending a message for every player who writes something in the chat is just trolling or plain foolishness.
Re: When someone joins , join message is bugged -
Elysian` - 10.06.2012
Quote:
Originally Posted by Cell_
Just ignore all of them. They are trying to fuck your server.
Windows32 doesn't even know what he is doing.
pawn Код:
public OnPlayerConnect(playerid) { new string[128], nameoftheplayerhaha[MAX_PLAYER_NAME] ; GetPlayerName(playerid, nameoftheplayerhaha, MAX_PLAYER_NAME); format(string, sizeof(string), "%s (%d) has joined YOUR SERVER NAME HERE", nameoftheplayerhaha, playerid); SendClientMessageToAll(-1, string); // You don't simply send message to all in role play servers }
|
LOL Really? Get your facts right. I have been scripting samp since 2008(don't moan about the joindate, I have a different account). Everyone makes mistakes sometimes, not everyone is a smartass, not even you. So don't even start.
Also take a look at your code. I don't even have to say anything.
Re: When someone joins , join message is bugged -
Rudy_ - 11.06.2012
Quote:
Originally Posted by Cell_
Mr . Rudy -.- is just Copying/Pasting
|