01.01.2012, 13:01
public OnPlayerConnect( playerid )
{
new playrname[ MAX_PLAYER_NAME ], string[ 256 ];
SetPlayerColor( playerid, COLOR_INACTIVE );
GameTextForPlayer(playerid,"~y~Welcome To~n~~w~Los Santos~n~~w~Turf Wars",4500,1);
SendClientMessage( playerid, COLOR_RED, "This is a Turf-war Server Dont Cheat or hack!!" );
SendClientMessage( playerid, COLOR_RED, "You may helikill" );
SendClientMessage( playerid, COLOR_YELLOW, "use /cmds for information" );
SendClientMessage(playerid, COLOR_YELLOW, "Type /anims for view the list of animations!");
SendClientMessage( playerid, COLOR_YELLOW, "================================================= ==========" );
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined the Turf War server.", playrname, playerid);
SendClientMessageToAll( COLOR_INACTIVE, string );
SendClientMessage(playerid, COLOR_GREEN, "Loading Server...");
// SendDeathMessage( INVALID_PLAYER_ID, playerid, 200 ); // Connect message in kill chart
playerCheckpoint[ playerid ] =999;
SetPlayerWantedLevel( playerid, 0 );
TeamKills[ playerid ] =0;
Spawned [ playerid ] =0;
ShowPM[ playerid ] =0;
ShowTPM[ playerid ] =0;
PlayerOnDuty[ playerid ]=0;
lTMoney[ playerid ] = 0;
lSMoney[ playerid ] = 0;
weapon[playerid]=0;
kills[playerid]=0;
won[playerid]=0;
GetPlayerName(playerid, playrname, sizeof(playrname));
for(new i = 0; i < MAX_SAVE; i++) {
if(isStringSame(savedNames[i], playrname, MAX_PLAYER_NAME)) {
bounty[playerid] = savedInfo[i][0];
savedInfo[i][0]=savedInfo[i][1]=0;
savedNames[i][0]=0;
for(new j = 0; j < MAX_WEAPONS; j++) {
playerWeapons[playerid][j]=savedWeapons[i][j];
savedWeapons[i][j]=0;
}
}
}
for (new i = 0; i < MAX_TURFS; i++) GangZoneShowForPlayer(playerid, turfs[ i ][turfID], turfs[ i ][TurfColor]);
return 1;
}
{
new playrname[ MAX_PLAYER_NAME ], string[ 256 ];
SetPlayerColor( playerid, COLOR_INACTIVE );
GameTextForPlayer(playerid,"~y~Welcome To~n~~w~Los Santos~n~~w~Turf Wars",4500,1);
SendClientMessage( playerid, COLOR_RED, "This is a Turf-war Server Dont Cheat or hack!!" );
SendClientMessage( playerid, COLOR_RED, "You may helikill" );
SendClientMessage( playerid, COLOR_YELLOW, "use /cmds for information" );
SendClientMessage(playerid, COLOR_YELLOW, "Type /anims for view the list of animations!");
SendClientMessage( playerid, COLOR_YELLOW, "================================================= ==========" );
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, 256, "<TurfWarServer> %s(ID: %d) has joined the Turf War server.", playrname, playerid);
SendClientMessageToAll( COLOR_INACTIVE, string );
SendClientMessage(playerid, COLOR_GREEN, "Loading Server...");
// SendDeathMessage( INVALID_PLAYER_ID, playerid, 200 ); // Connect message in kill chart
playerCheckpoint[ playerid ] =999;
SetPlayerWantedLevel( playerid, 0 );
TeamKills[ playerid ] =0;
Spawned [ playerid ] =0;
ShowPM[ playerid ] =0;
ShowTPM[ playerid ] =0;
PlayerOnDuty[ playerid ]=0;
lTMoney[ playerid ] = 0;
lSMoney[ playerid ] = 0;
weapon[playerid]=0;
kills[playerid]=0;
won[playerid]=0;
GetPlayerName(playerid, playrname, sizeof(playrname));
for(new i = 0; i < MAX_SAVE; i++) {
if(isStringSame(savedNames[i], playrname, MAX_PLAYER_NAME)) {
bounty[playerid] = savedInfo[i][0];
savedInfo[i][0]=savedInfo[i][1]=0;
savedNames[i][0]=0;
for(new j = 0; j < MAX_WEAPONS; j++) {
playerWeapons[playerid][j]=savedWeapons[i][j];
savedWeapons[i][j]=0;
}
}
}
for (new i = 0; i < MAX_TURFS; i++) GangZoneShowForPlayer(playerid, turfs[ i ][turfID], turfs[ i ][TurfColor]);
return 1;
}