26.02.2012, 08:13
Hello i just want to know how to script that a player had Joined my server and it looks like this:
Eljay Mizanin had Joined MGRP
Like that.
Eljay Mizanin had Joined MGRP
Like that.
case 2:
{
format(string, sizeof(string), "%s has left the server (kicked/banned).", GetPlayerNameEx(playerid));
ProxDetector(999999.99999, playerid, string, COLOR_TWAQUA,COLOR_TWAQUA,COLOR_TWAQUA,COLOR_TWAQUA,COLOR_TWAQUA);
}
}
public OnPlayerConnect(playerid)
{
new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s has joined the server", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
public OnPlayerConnect(playerid)
{
// Crash Fix - GhoulSlayeR
InvalidNameCheck(playerid);
new playerIP[16];
GetPlayerIp(playerid, playerIP, sizeof(playerIP));
if (CheckBan(playerIP) == 1)
{
SetPlayerName(playerid, "BannedPlayer");
SendClientMessage(playerid, COLOR_RED, "SERVER: You are banned from this server.");
Kick(playerid);
return 1;
}
if(IsPlayerNPC(playerid)) return 1;
TotalConnect++;
PlayersConnected++;
if(PlayersConnected > MaxPlayersConnected)
{
MaxPlayersConnected = PlayersConnected;
gettime(MPHour,MPMinute);
getdate(MPYear,MPMonth,MPDay);
}
public OnPlayerConnect(playerid)
{
// Crash Fix - GhoulSlayeR
InvalidNameCheck(playerid);
new playerIP[16];
GetPlayerIp(playerid, playerIP, sizeof(playerIP));
if (CheckBan(playerIP) == 1)
{
new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s has joined the server", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}
SetPlayerName(playerid, "BannedPlayer");
SendClientMessage(playerid, COLOR_RED, "SERVER: You are banned from this server.");
Kick(playerid);
return 1;
}
if(IsPlayerNPC(playerid)) return 1;
TotalConnect++;
PlayersConnected++;
if(PlayersConnected > MaxPlayersConnected)
{
MaxPlayersConnected = PlayersConnected;
gettime(MPHour,MPMinute);
getdate(MPYear,MPMonth,MPDay);
}
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2908) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2908) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2915) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2915) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2922) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2922) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2931) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2931) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2937) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2937) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2945) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2945) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2952) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2952) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2959) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2959) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2966) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2966) : warning 202: number of arguments does not match definition
C:\DOCUME~1\DWINLI~1\Desktop\RG-RP@~1\GAMEMO~1\NGRP.pwn(2977) : warning 202: number of arguments does not match definition
public OnPlayerConnect(playerid)
{
//New string variable for join message:
new szJoinMessage[128];
//New string variable for player name:
new szPlayerName[24];
//Get the player's name:
GetPlayerName( playerid, szPlayerName, sizeof szPlayerName );
//Format it into dest string, the join message:
format( szJoinMessage, sizeof szJoinMessage, "{FFFFFF}%s has joined MGRP.", szPlayerName );
//Send formatted string to all players.
SendClientMessageToAll( -1, szJoinMessage );
return 1;
}