27.11.2013, 09:48
(
Последний раз редактировалось bigtigerbeee; 28.11.2013 в 11:52.
)
Delete Thx a lot
) button, double posting is not allowed.MP_OPC It on inc mSelection
public OnPlayerConnect(playerid)
{
// Init all of the textdraw related globals
gHeaderTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
gBackgroundTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
gCurrentPageTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
gNextButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
gPrevButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
gCancelButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
for(new x=0; x < mS_SELECTION_ITEMS; x++) {
gSelectionItems[playerid][x] = PlayerText:INVALID_TEXT_DRAW;
}
gItemAt[playerid] = 0;
return CallLocalFunction("MP_OPC", "i", playerid);
}
-d3
#if defined _ALS_OnPlayerConnect #undef OnPlayerConnect #else #define _ALS_OnPlayerConnect #endif #define OnPlayerConnect MP_OPC forward MP_OPC(playerid);
public OnPlayerSpawn(playerid) {
#if defined DEBUG
printf("[debug] OnPlayerSpawn(%d)", playerid);
#endif
/* if (!IsPlayerNPC(playerid))
{
if(PlayerInfo[playerid][aAntiSpeedHack]!=2)
{
PlayerInfo[playerid][aAntiSpeedHack]=1;
}
}*/
if(PlayerInfo[playerid][pStatus] == 0 && IsPlayerConnected(playerid))
{
Kick(playerid);
}
for(new a=0; a < 129; a++) ApplyAnimation(playerid,AnimLibraies[a],"null",0.0,0,0,0,0,0);
for(new i=0; i < sizeof(ZoneInfo); i++)
{
GangZoneShowForPlayer(playerid, ZoneID[i], GetTeamZoneColor(FamilyInfo[ZoneInfo[i][eOwnerid]][FamilyColor]));
if(ZoneAttacker[i] != -1) GangZoneFlashForPlayer(playerid, ZoneID[i], GetTeamZoneColor(FamilyInfo[ZoneAttacker[i]][FamilyColor]));
}
SetPlayerColor(playerid, COLOR_WHITE);
SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]);
//SetSafePlayerPos(playerid, 0, 0, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 998);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 998);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 998); // Skilled, but not dual-wield.
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 0);
ShowPlayerBar(playerid);
if(PlayerInfo[playerid][pPrisonTime] >= 1) {
switch(PlayerInfo[playerid][pPrisonID]) {
case 1: {
SetSafePlayerPos(playerid, -26.8721, 2320.9290, 24.3034);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
case 2: {
SetSafePlayerPos(playerid, 264.58, 77.38, 1001.04);
SetPlayerInterior(playerid, 6);
SetPlayerVirtualWorld(playerid, 0);
}
case 3: {
if(PlayerInfo[playerid][pPrisonUse] == -1)
{
SetPlayerInterior(playerid, 1);
SetPlayerVirtualWorld(playerid, GROUP_VIRTUAL_WORLD+5);
SetSafePlayerPos(playerid, -114.0368,1873.2427,1428.4781);
SetPlayerFacingAngle(playerid, 0);
SendClientMessage(playerid, -1,"ЎГШіТаЕЧНЎЛйН§ўС§·ХиµйН§ЎТГЎиН№, гЄй /takejail");
SetPlayerSkin(playerid, 268);
}
else
{
SetPlayerInterior(playerid, 1);
SetPlayerVirtualWorld(playerid, GROUP_VIRTUAL_WORLD+5);
new jailid = PlayerInfo[playerid][pPrisonUse];
SetSafePlayerPos(playerid, JailInfo[jailid][jaiPos][0],JailInfo[jailid][jaiPos][1],JailInfo[jailid][jaiPos][2]);
SetPlayerFacingAngle(playerid, 0);
SetPlayerSkin(playerid, 268);
}
/* SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
new spawn = random(sizeof(JailSpawns));
SetSafePlayerPos(playerid, JailSpawns[spawn][0], JailSpawns[spawn][1], JailSpawns[spawn][2]);
SetPlayerFacingAngle(playerid, 0);*/
}
}
return 1;
}
if(PlayerInfo[playerid][pTutorial] == 1) {
SetPlayerInterior(playerid, 14);
SetSafePlayerPos(playerid, 216.9770, -155.4791, 1000.5234);
SetPlayerFacingAngle(playerid, 267.9681);
TogglePlayerControllable(playerid, false);
return 1;
}
if(FixDSpawn[playerid] == 0 && NewbieSpawn[playerid] == 0)
{
if(PlayerInfo[playerid][pDie] >= 1)
{
initiateDie(playerid);
return 1;
}
if(PlayerInfo[playerid][pHospitalized] >= 1)
{
initiateHospital(playerid);
return 1;
}
}
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
SetSafePlayerPos(playerid, PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2]);
SetPlayerInterior(playerid, PlayerInfo[playerid][pInterior]);
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);
PlayerTextDrawShow(playerid, SDPlace[playerid]);
SetCameraBehindPlayer(playerid);
PlayerInfo[playerid][pSkinSet] = 1;
TextDrawShowForPlayer(playerid, SERVERNAME);
ResetPlayerWeapons(playerid);
//giveSaveWP(playerid);
if(PlayerInfo[playerid][pEvent] >= 1)
PlayerInfo[playerid][pEvent] = 0;
if(PlayerInfo[playerid][pAdminDuty] == 1) {
SetPlayerHealth(playerid, 500000.0);
}
else {
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
}
if(!GetPlayerInterior(playerid)) {
SetPlayerWeather(playerid, weatherVariables[0]);
}
else {
SetPlayerWeather(playerid, INTERIOR_WEATHER_ID);
}
syncPlayerTime(playerid);
TogglePlayerControllable(playerid, true);
return 1;
}
for(new a=0; a < 129; a++) ApplyAnimation(playerid,AnimLibraies[a],"null",0.0,0,0,0,0,0);
for(new i=0; i < sizeof(ZoneInfo); i++)
{
GangZoneShowForPlayer(playerid, ZoneID[i], GetTeamZoneColor(FamilyInfo[ZoneInfo[i][eOwnerid]][FamilyColor]));
if(ZoneAttacker[i] != -1) GangZoneFlashForPlayer(playerid, ZoneID[i], GetTeamZoneColor(FamilyInfo[ZoneAttacker[i]][FamilyColor]));
}
new jailid = PlayerInfo[playerid][pPrisonUse];
SetSafePlayerPos(playerid, JailInfo[jailid][jaiPos][0],JailInfo[jailid][jaiPos][1],JailInfo[jailid][jaiPos][2]);