pawn Код:
public OnPlayerConnect
(playerid
){ format(gString, SOS,
"Bem Vindo '%s' ao COD - Mundo em ChamaS v1.00", PlayerName
(playerid
)); SendClientMessage
(playerid, COLOR_GREEN, gString
);
SendClientMessage
(playerid, COLOR_GREEN,
"See /cmds for server commands and see /help for more info on how to play");
SendClientMessage
(playerid, green,
"Use /playstream [link] to play songs");
SendClientMessage
(playerid, green,
"Visite http://www.fb/sttlasvegas.com nosso ********");
TogglePlayerSpectating
(playerid,true
);
SetPlayerWeather
(playerid,
2);
TextDrawShowForPlayer
(playerid, Textdraw
[0]);
TextDrawShowForPlayer
(playerid, Textdraw
[1]);
TextDrawShowForPlayer
(playerid, Textdraw
[2]);
TextDrawShowForPlayer
(playerid, Textdraw
[3]);
TextDrawShowForPlayer
(playerid, Textdraw
[4]);
TextDrawShowForPlayer
(playerid, Textdraw
[5]);
TextDrawShowForPlayer
(playerid, Textdraw
[6]);
TextDrawShowForPlayer
(playerid, Textdraw
[7]);
TextDrawShowForPlayer
(playerid, Textdraw
[8]);
TextDrawShowForPlayer
(playerid, Textdraw
[9]);
TextDrawShowForPlayer
(playerid, Textdraw
[10]);
if(CountIP
(GetIPP
(playerid
)) >= 6) return Kick
(playerid
),
0;
MAX_PLAYERS_
= playerid
> MAX_PLAYERS_
? playerid : GetHighestID
(),
npc
[playerid
] = bool:IsPlayerNPC
(playerid
),
var
[playerid
] = SetTimerEx
("BSS",
2500,false,
"i",playerid
),
warns
[playerid
] = 0;
Spree
[playerid
] = 0;
DeleteObjects
(playerid
);
SetPVarInt
(playerid,
"vehicleid",
0);
foreach
(Zones, i
) { SetPlayerMapIcon
(playerid,
30 + i, ZoneInfo
[i
][pointPos
][0],ZoneInfo
[i
][pointPos
][1],ZoneInfo
[i
][pointPos
][2],
19, MAPICON_GLOBAL
);
GangZoneShowForAll
(Zone
[i
], 0x00000043
);
CapturingZone
[playerid
] = -1;
if (tCP
[i
] == NONE
) GangZoneShowForAll
(Zone
[i
],
-66);
else if (tCP
[i
] == USA
) GangZoneShowForAll
(Zone
[i
], USA_GZ_COLOR
);
else if (tCP
[i
] == RF
) GangZoneShowForAll
(Zone
[i
], RF_GZ_COLOR
);
else if (tCP
[i
] == AI
) GangZoneShowForAll
(Zone
[i
], AI_GZ_COLOR
);
else if (tCP
[i
] == IU
) GangZoneShowForAll
(Zone
[i
], IU_GZ_COLOR
);
else if (tCP
[i
] == EA
) GangZoneShowForAll
(Zone
[i
], EA_GZ_COLOR
);
// else if (tCP[i] == AA) GangZoneShowForAll(Zone[i], AA_GZ_COLOR);// else if (tCP[i] == LG) GangZoneShowForAll(Zone[i], LG_GZ_COLOR);// else if (tCP[i] == GW) GangZoneShowForAll(Zone[i], GW_GZ_COLOR); } capturebar
[playerid
] = CreatePlayerProgressBar
(playerid,
40,
320,
100,
10, COLOR_GREEN,
25);
ClassTaken
[playerid
] = 1;
FirstSpawn
[playerid
] = 0;
PlayerInfo
[playerid
][pVIP
] = 0;
//Setting the VIP level 0 on player connect- Enablevheal
[playerid
] = 1;
//Enabling the /vheal command on player connect-- Enablevbonus
[playerid
] = 1;
//Enabling the /vbonus command on player connect HasSpawnedCar
[playerid
] = 0;
//-Setting the value to 0 //-------------Checking and creating the player account in database--------- new ggString
[200];
format(ggString,
sizeof(ggString
),
"%s has ~g~joined ~w~the server!", PlayerName
(playerid
));
//SendClientMessageToAll(-1, ggString); SendBoxMessage
(playerid, ggString
);
MapIcons
(playerid
);
//-------------------------------- GangZoneShowForAll
(GZ_ZONE_U, USA_GZ_COLOR
);
//usa GZ GangZoneShowForAll
(GZ_ZONE_I, IU_GZ_COLOR
);
//Indian GZ GangZoneShowForAll
(GZ_ZONE_E, EA_GZ_COLOR
);
//euro GZ //GangZoneShowForAll(GZ_ZONE4, EA_GZ_COLOR); //europe GZ //GangZoneShowForAll(GZ_ZONE5, LG_GZ_COLOR); //latino GZ GangZoneShowForAll
(GZ_ZONE_R, RF_GZ_COLOR
);
//Russia GZ GangZoneShowForAll
(GZ_ZONE_A, AI_GZ_COLOR
);
//arabia GZ //GangZoneShowForAll(GZ_ZONE8, AA_GZ_COLOR); //aussie GZ PlayerInfo
[playerid
][pAdmin
] = 0;
PlayerInfo
[playerid
][pHelper
] = 0;
PlayerInfo
[playerid
][pJailed
] = 0;
PlayerInfo
[playerid
][pKills
] = 0;
PlayerInfo
[playerid
][pDeaths
] = 0;
PlayerInfo
[playerid
][pScores
] = 0;
PlayerInfo
[playerid
][pMoney
] = 0;
PlayerInfo
[playerid
][AdminDuty
] = 0;
PlayerInfo
[playerid
][pWarns
] = 0;
PlayerInfo
[playerid
][pSpamTime
] = 0;
PlayerInfo
[playerid
][Paused
] = 0;
PlayerInfo
[playerid
][LastDeath
] = 0;
PlayerInfo
[playerid
][DeathSpam
] = 0;
PlayerInfo
[playerid
][pLogged
] = 0;
PlayerInfo
[playerid
][pMuted
] = 0;
PlayerInfo
[playerid
][FailLogin
] = 0;
PlayerInfo
[playerid
][A51Spawn
] = 0;
PlayerInfo
[playerid
][DASpawn
] = 0;
PlayerInfo
[playerid
][BIGSpawn
] = 0;
PlayerInfo
[playerid
][NorSpawn
] = 1;
HasSpawnedCar
[playerid
] = 0;
DND
[playerid
] = 0;
//-------------------------------- MySQL_BanCheck
(playerid
);
//-------------------------------- //--------Account registration---- new query
[200];
format(query,
sizeof(query
),
"SELECT IP FROM `playerdata` WHERE user = '%s' LIMIT 1", escpname
(playerid
));
mysql_query
(query
);
mysql_store_result
();
new rows
= mysql_num_rows
();
if(!rows
) { ShowPlayerDialog
(playerid, R_DIALOG, DIALOG_STYLE_PASSWORD,
"Register",
"Your account is "cred
"not "corange
"registered\nPlease type your password to register",
"Register",
"Quit");
} if(rows
== 1) { ShowPlayerDialog
(playerid, L_DIALOG, DIALOG_STYLE_PASSWORD,
"Login",
""corange
"Your account is already registered\nPlease type your password to login",
"Login",
"Quit");
} mysql_free_result
();
//--------------------------------- return 1;
}