Quote:
Originally Posted by GTLS
I'm not downloading anything. Copy OnPlayerConnect and OnPlayerSpawn code from the script and show us here. Use [code] or [php] tag for the code.
|
Ok.
OnPlayerConnect:
Код:
public OnPlayerConnect(playerid)
{
SetSpawnInfo(playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
ChangeSpeed[playerid] = 1;
PlayerInfo[playerid][Busted] = 0;
PlayerInfo[playerid][SecuredAccount] = 0;
PlayerInfo[playerid][Share] = 0;
UsingOptions[playerid] = 0;
OfertaPrietenie[playerid] = INVALID_PLAYER_ID;
AvailableHidden[playerid] = 0;
FactionMute[playerid] = 0;
MatsHolding[playerid] = 0;
WaitSearching[playerid] = 0;
VehicleRented[playerid] = 0;
ModelAlesVehicul[playerid] = 0;
CarSellingID[playerid] = 0;
SpeedTicketed[playerid] = 0;
VehicleSlotChoosen[playerid] = 0;
personalcar1[playerid] = 0;
personalcar2[playerid] = 0;
personalcar3[playerid] = 0;
CameraFPS[playerid] = false;
Seatbelt[playerid] = false;
VanzareSlot[playerid] = INVALID_PLAYER_ID;
VanzareJucator[playerid] = INVALID_PLAYER_ID;
PornesteMotor[playerid] = 0;
estelaox[playerid] = 0;
PlayerInfo[playerid][AdminJailed] = 0;
HaveHit[playerid] = INVALID_PLAYER_ID;
PlayerInfo[playerid][pVehicle1] = 0;
PlayerInfo[playerid][pVehicle2] = 0;
PlayerInfo[playerid][pVehicle3] = 0;
Cameleon[playerid] = 0;
EventSpeak[playerid] = 0;
RadarPornit[playerid] = 0;
format(PlayerInfo[playerid][ClanName], 50, "Membru");
HouseIcon[playerid] = 0;
ClockStyle[playerid] = 2;
PersonalID[playerid] = 0;
Gambling[playerid] = G_STATE_NOT_GAMBLING;
SlotTimer[playerid] = -1;
format(UltimaComanda[playerid], 256, "Nimic");
PlayerInfo[playerid][fPunish] = 0;
SeenWar[playerid] = 0;
IsRegistering[playerid] = 0;
InsideArena[playerid] = 0;
Spectating[playerid] = INVALID_PLAYER_ID;
NameChanged[playerid] = 0;
VeziTD[playerid] = 1;
RefillSpam[playerid] = 0;
RepairSpam[playerid] = 0;
AntiReclamaWarns[playerid] = 0;
AntiKickSpam[playerid] = 0;
//AntiSpamEvent[playerid] = 0;
//JoiningEvent[playerid] = 0;
AntiFare[playerid] = 0;
hGuard[playerid] = 1;
OfferGP[playerid] = INVALID_PLAYER_ID;
WaitToCmd[playerid] = 0;
WaitToTalk[playerid] = 0;
PlayerInfo[playerid][Helps] = 0;
PlayerInfo[playerid][Newbies] = 0;
PlayerInfo[playerid][Reports] = 0;
WaitHelp[playerid] = 0;
TendinteDMSafe[playerid] = 0;
PresupusCrasher[playerid] = 0;
new ConnIP[16];
GetPlayerIp(playerid,ConnIP,16);
new compare_IP[16];
new number_IP = 0;
for(new i=0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
GetPlayerIp(i,compare_IP,16);
if(!strcmp(compare_IP,ConnIP)) number_IP++;
}
}
if((GetTickCount() - Join_Stamp) < Time_Limit)
exceed=1;
else
exceed=0;
if(strcmp(ban_s, ConnIP, false) == 0 && exceed == 1 )
{
Same_IP++;
if(Same_IP > SAME_IP_CONNECT)
{
Ban(playerid);
Same_IP=0;
}
}
else
{
Same_IP=0;
}
if(number_IP > IP_LIMIT)
{
Kick(playerid);
GetStampIP(playerid);
}
//
KilledBy[playerid] = INVALID_PLAYER_ID;
Undita[playerid] = 0;
Momeala[playerid] =0;
BanNewbie[playerid] = 0;
HaveNewbie[playerid] = 0;
WaitNewbie[playerid] = 0;
WaitReport[playerid] = 0;
DetectatTeleport[playerid] = 0;
ClanTagged[playerid] = 0;
IsFlying[playerid] = 0;
InitFly(playerid);
PlayerInfo[playerid][pConnectTimeOre] = 0;
PlayerInfo[playerid][pConnectTimeMinute] = 0;
Searched[playerid] = 0;
PlayerInfo[playerid][RobSkill] = 1;
IsRobbing[playerid] = 0;
WaitNewbie[playerid] = 0;
DamageTaken[playerid] = 0;
ReportMinutes[playerid] = 0;
BlockFind[playerid] = 0;
FindingDetectiveID[playerid] = INVALID_PLAYER_ID;
PlayerInfo[playerid][SideJob] = 0;
JobAsk[playerid] = 1;
PlayerInfo[playerid][ImprumutTotal] = 0;
PlayerInfo[playerid][Imprumut] = 0;
NotWorking[playerid] =0 ;
Tir[playerid] = 0;
lastkey[playerid] = 0;
Spectating[playerid] = INVALID_PLAYER_ID;
ZombieDead[playerid] = 0;
ZombieEvent[playerid] = 0;
ListenToEvent[playerid] = 0;
AfkInterval[playerid] = GetTickCount();
HaveTazer[playerid] = 0;
PlayerInfo[playerid][pPayDayHad] = 0;
UsingInventory[playerid] = 0;
Update10Min[playerid] = 1;
BloodScoreK[playerid] = 0;
BloodScoreD[playerid] = 0;
SetPVarInt(playerid, "TogAC", 1);
SetPVarInt(playerid, "TogHC", 1);
SetPVarInt(playerid, "TogFC", 1);
SetPVarInt(playerid, "TogRD", 1);
SetPVarInt(playerid, "TogAD", 1);
SetPVarInt(playerid, "TogGC", 1);
SetPVarInt(playerid, "TogCR", 1);
SetPVarInt(playerid, "TogPH", 1);
SetPVarInt(playerid, "TogPM", 1);
SetPVarInt(playerid, "TogSMS", 1);
SetPVarInt(playerid, "TogPA", 1);
SetPVarInt(playerid, "TogFA", 1);
SetPVarInt(playerid, "TogRP", 1);
SetPVarInt(playerid, "TogLC", 1);
SetPVarInt(playerid, "TogNEWS", 1);
SetPVarInt(playerid, "TogBOOM", 1);
MedicKit[playerid] = 0;
// OfferVehID[playerid] = INVALID_PLAYER_ID;
KeysVehicle[playerid] = 0;
RepairOffer[playerid] = INVALID_PLAYER_ID;
TowedID[playerid] = 0;
PlayerInfo[playerid][DonateWait] = 0;
HealAvailable[playerid] = 0;
HaveRope[playerid] = 0;
PlayerInfo[playerid][pDice] = 0;
new name[MAX_PLAYER_NAME+24];
GetPlayerName(playerid, name, 456);
PlayerInfo[playerid][gPoints] = 0;
GetPlayerName(playerid, RealName[playerid], 25);
GetPlayerName(playerid, RealName2[playerid], 25);
IsFreezed[playerid] = 0;
BusinessRobbed[playerid] = 0;
BusinessMoney[playerid] = 0;
PlayerInfo[playerid][pIna] = 0;
NameTags[playerid] = 0;
HideClock[playerid] = 0;
Masked[playerid] = 0;
ClearMarriage(playerid);
MapTeleport[playerid] = 0;
for(new i = 0; i < 11; i++)
{
Car[i][playerid] = 43001;
}
for(new i = 0; i < 11; i++)
{
PlayerInfo[playerid][pJobSkillL][i] = 1;
PlayerInfo[playerid][pJobSkillA][i] = 0;
PlayerInfo[playerid][pJobSkillN][i] = 15;
}
for(new i = 0; i < 20; i++)
{
PlayerInfo[playerid][pInvType][i] = 0;
PlayerInfo[playerid][pInvCant][i] = 0;
}
GoldExecutari[playerid] = 0;
WaitReport[playerid] = 0;
WaitService[playerid] = 0;
WaitHelp[playerid] = 0;
WarScoreK[playerid] = 0;
WarScoreD[playerid] = 0;
ClanID[playerid] = 0;
BloodW[playerid] = 0;
SpawnChange[playerid] = 0;
FindingID[playerid] = INVALID_PLAYER_ID;
PlayerInfo[playerid][pClan] = 0;
if(CountIP(GetIP(playerid)) >= 4) return BanAll(playerid), 1;
HReady[playerid] = 0;
DMV[playerid] = 0;
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][gPoints] = 0;
PlayerInfo[playerid][fActivity]= 0;
PlayerInfo[playerid][fHours]= 0;
PlayerInfo[playerid][pAge] = 0;
PlayerInfo[playerid][pPnumber] = 0;
PlayerInfo[playerid][pHelper] = 0;
PlayerInfo[playerid][pAdmin] = 0;
PlayerInfo[playerid][pDonateRank] = 0;
PlayerInfo[playerid][pHead] = 0;
PlayerInfo[playerid][pFace] = 0;
PlayerInfo[playerid][pBody] = 0;
PlayerInfo[playerid][pWanted] = 0;
PlayerInfo[playerid][pConnectTimeW]= 0;
PlayerInfo[playerid][pReg] = 0;
PlayerInfo[playerid][pSex] = 0;
PlayerInfo[playerid][pRob] =0;
PlayerInfo[playerid][pPsbiskey] =0;
PlayerInfo[playerid][pLocked] = 0;
PlayerInfo[playerid][pMuted] = 0;
PlayerInfo[playerid][pMuteTime] = 0;
PlayerInfo[playerid][pExp] = 0;
PlayerInfo[playerid][pCash] = 0;
PlayerInfo[playerid][pAccount] = 0;
PlayerInfo[playerid][pCrimes] = 0;
PlayerInfo[playerid][pPhoneBook] =0;
PlayerInfo[playerid][pJob] = 0;
PlayerInfo[playerid][pHeadValue] = 0;
PlayerInfo[playerid][pJailed] = 0;
PlayerInfo[playerid][pJailTime] = 0;
PlayerInfo[playerid][pDrugs] = 0;
PlayerInfo[playerid][pLeader] = 0;
PlayerInfo[playerid][pMember] = 0;
PlayerInfo[playerid][pRank] = 0;
PlayerInfo[playerid][pChar] = 0;
PlayerInfo[playerid][pPnumber] = 0;
PlayerInfo[playerid][pPhousekey] = 0;
PlayerInfo[playerid][pWarn] = 0;
PlayerInfo[playerid][fWarn] = 0;
PlayerInfo[playerid][pPbiskey] = 0;
PlayerInfo[playerid][pCarLic] = 0;
PlayerInfo[playerid][pFlyLic] = 0;
PlayerInfo[playerid][pBoatLic] = 0;
PlayerInfo[playerid][pGunLic] = 0;
PlayerInfo[playerid][pMarried] = 0;
format(PlayerInfo[playerid][pMarriedTo], 80, "Nimeni");
format(PlayerInfo[playerid][pLockedReason], 80, "Nimeni");
format(PlayerInfo[playerid][pLockedBy], 80, "Nimeni");
format(PlayerInfo[playerid][pLastOnline], 80, "25 Ian");
format(PlayerInfo[playerid][pRegisterDate], 80, "25 Ian");
PlayerInfo[playerid][pMark][0] = 0;
PlayerInfo[playerid][pMark][1] = 0;
PlayerInfo[playerid][pMark][2] = 0;
RadioID[playerid] = 0;
Cuffed[playerid] =0;
CarCuffed[playerid] = 0;
Tied[playerid] = 0;
IsWorking[playerid] = 0;
PlayerInfo[playerid][fActivity] = 0;
Mobile[playerid] = 255;
PlayerInfo[playerid][pRob] = 0;
ClientID[playerid] = INVALID_PLAYER_ID;
TaxiID[playerid] = INVALID_PLAYER_ID;
TaxiOffer[playerid] = INVALID_PLAYER_ID;
LastSMS[playerid] = INVALID_PLAYER_ID;
NeedMedic[playerid] = 0;
Fare[playerid] = 0;
GPS[playerid] = 0;
GPSID[playerid] = 0;
BoardID[playerid] = 1;
PlayerInfo[playerid][fHours] = 0;
SetPlayerColor(playerid, 0xFFFFFF00);
FactionID[playerid] = 0;
AreMancare[playerid] = 0;
sPlayers ++;
MarriageOffered[playerid] = INVALID_PLAYER_ID;
MarriageTo[playerid] = INVALID_PLAYER_ID;
AntiActionsSpam[playerid] = 0;
IsDrunk[playerid] = 0;
HaveDrunk[playerid] = 0;
IsMining[playerid] = 0;
ArmedWeapon[playerid] = 0;
RequestEvent[playerid] = 0;
IsInSpawnSafe[playerid] = 0;
GarageEntered[playerid] = 0;
PremiumAnnounceTimeOut[playerid] = 0;
PlayerInfo[playerid][pWanted] = 0;
SeenWorkTextdraw[playerid] = 0;
PlayerInfo[playerid][JobBoost] = 0;
ShowPartener[playerid] = 0;
IsJumping[playerid] = 0;
TrailEffect[playerid] = 0;
JobTrailered[playerid] = 0;
IsWorking[playerid] = 0;
HaveWalkie[playerid] = 0;
WalkieFrecventa[playerid] = 0;
AntiSpamDice[playerid] = 0;
gDiceInvitingTo[playerid] = INVALID_PLAYER_ID;
gDiceInvitingMoney[playerid] = 0;
MarkingID[playerid] = INVALID_PLAYER_ID;
AllowedTeleport[playerid] = 0;
Detectedc[playerid] = 0;
ClockID[playerid] = 1;
BoardID[playerid] = 1;
dsMethod[playerid] = 0;
BindSlot[playerid] = 0;
RespawnedVehTimers[playerid] = 0;
dPersonalID[playerid] = 0;
IsBlooding[playerid] = 0;
// [ - Most Important - ] -
IncarcaRemoveBuildings(playerid);
IncarcaPlayerTextdraws(playerid);
//
IsSpawnedServer[playerid] = 0;
CheckpointLocateRent[playerid] = 0;
PlayerInfo[playerid][pWarn] = 0;
PlayerInfo[playerid][fWarn] = 0;
IsEditingFace[playerid] = 0;
IsEditingBody[playerid] = 0;
IsEditingHead[playerid] = 0;
SetPVarInt(playerid, "ReportID", -1);
RadioID[playerid] = 0;
sEngine[playerid] = 0;
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
gActivePlayers[playerid]++;
numplayers++;
dmvcheckpointid[playerid] = 0;
SelectChar[playerid] = 0; HidePM[playerid] = 0;
SelectCharID[playerid] = 0; SelectCharPlace[playerid] = 0; ChosenSkin[playerid] = 0;
GettingJob[playerid] = 0; GuardOffer[playerid] = 999; GuardPrice[playerid] = 0;
ApprovedLawyer[playerid] = 0; CallLawyer[playerid] = 0; WantLawyer[playerid] = 0;
KickPlayer[playerid] = 0; CurrentMoney[playerid] = 0;
CP[playerid] = 0; Robbed[playerid] = 0; SpawnChange[playerid] = 1;
CarOffer[playerid] = 999; CarID[playerid] = 0; CarCalls[playerid] = 0;
RobbedTime[playerid] = 0; Rope[playerid] = 0;
SexOffer[playerid] = 999; SexPrice[playerid] = 0;
RepairCar[playerid] = 0;
TalkingLive[playerid] = 255; LiveOffer[playerid] = 999; TakingLesson[playerid] = 0;
RefillOffer[playerid] = 999; RefillPrice[playerid] = 0; MapIconsShown[playerid] = 0;
DrugOffer[playerid] = 999; PlayerCuffed[playerid] = 0; PlayerCuffedTime[playerid] = 0;
DrugPrice[playerid] = 0; RegistrationStep[playerid] = 0; OnCK[playerid] = 999; GettingCK[playerid] = 999;
DrugGram[playerid] = 0; ConnectedToPC[playerid] = 0; OrderReady[playerid] = 0;
JailPrice[playerid] = 0; MedicTime[playerid] = 0; NeedMedicTime[playerid] = 0; MedicBill[playerid] = 0;
WantedPoints[playerid] = 0; GoChase[playerid] = 999; GetChased[playerid] = 999; PlacedNews[playerid] = 0;
WantedLevel[playerid] = 0; tactical[playerid] = 0; swat[playerid] = 0;
BoxWaitTime[playerid] = 0; SchoolSpawn[playerid] = 0;
PlayerTied[playerid] = 0;
JobDuty[playerid] = 0;
Music[playerid] = 0; BoxOffer[playerid] = 999;
Spectate[playerid] = 255;
Unspec[playerid][sLocal] = 255;
gLastCar[playerid] = 0; FirstSpawn[playerid] = 1;
gOoc[playerid] = 0; gNews[playerid] = 0; BigEar[playerid] = 0; gFam[playerid] = 0;
gSpeedo[playerid] = 0; gGas[playerid] = 0;
IsSpawnedServer[playerid] = 0; gPlayerLogTries[playerid] = 0; gPlayerAccount[playerid] = 0;
gPlayerSpawned[playerid] = 0;
PlayerTazeTime[playerid] = 0; PlayerStoned[playerid] = 0;
StartTime[playerid] = 0; TicketOffer[playerid] = INVALID_PLAYER_ID; TicketMoney[playerid] = 0;
TutTime[playerid] = 0;
PlayerInfo[playerid][pCash] = 0;
GangCar[playerid] = 512; PlayersChannel[playerid] = 999;
Locator[playerid] = 0;
WatchingTV[playerid] = 0;
ProposeOffer[playerid] = 999; MarryWitness[playerid] = 999; MarryWitnessOffer[playerid] = 999; MarriageCeremoney[playerid] = 0; ProposedTo[playerid] = 999; GotProposedBy[playerid] = 999; DivorceOffer[playerid] = 999;
tactical[playerid] = 0; swat[playerid] = 0;
PizzaCallTime[playerid] = 0; bPizza[playerid] = 0; sPizza[playerid] = 0; JustDied[playerid] = 0; KnockedDown[playerid] = 0; UnidentifedCall[playerid] = 0;
LicenseOffer[playerid] = 999; LicensePrice[playerid] = 0; LicenseType[playerid] = 0; UsingDrugs[playerid] = 0; AfterTutorial[playerid] = 0;
OwnableCarOffer[playerid] = 999; OwnableCarID[playerid] = 0; OwnableCarPrice[playerid] = 0; BlindFold[playerid] = 0; PlayerNeedsHelp[playerid] = 0; AdminSpec[playerid] = 0; IsSmoking[playerid] = 0; UsingSmokeAnim[playerid] = 0; ReduceTime[playerid] = 0;
CreatingGun[playerid] = 0; CreatingGunAmmo[playerid] = 0; CreatingGunPrice[playerid] = 0; IsPuttingMaterials[playerid] = 0; IsTakingGun[playerid] = 0;
InAFoodPlace[playerid] = 0;
PlayerInfo[playerid][pLevel] = 0;
PlayerInfo[playerid][pAdmin] = 0;
PlayerInfo[playerid][pDonateRank] = 0;
PlayerInfo[playerid][pConnectTimeW] = 0;
PlayerInfo[playerid][pReg] = 0;
PlayerInfo[playerid][pSex] = 0;
PlayerInfo[playerid][pAge] = 0;
PlayerInfo[playerid][pExp] = 0;
PlayerInfo[playerid][pAccount] = 0;
PlayerInfo[playerid][pCrimes] = 0;
PlayerInfo[playerid][pPhoneBook] = 0;
PlayerInfo[playerid][pJob] = 0;
PlayerInfo[playerid][pPayCheck] = 0;
PlayerInfo[playerid][pHeadValue] = 0;
PlayerInfo[playerid][pJailed] = 0;
PlayerInfo[playerid][pJailTime] = 0;
PlayerInfo[playerid][pDrugs] = 0;
PlayerInfo[playerid][pLeader] = 0;
PlayerInfo[playerid][pMember] = 0;
PlayerInfo[playerid][pRank] = 0;
PlayerInfo[playerid][pChar] = 0;
PlayerInfo[playerid][pPnumber] = 0;
PlayerInfo[playerid][pPhousekey] = 0;
PlayerInfo[playerid][pPbiskey] = 0;
PlayerInfo[playerid][pCarLic] = 0;
PlayerInfo[playerid][pFlyLic] = 0;
PlayerInfo[playerid][pBoatLic] = 0;
PlayerInfo[playerid][pGunLic] = 0;
PlayerInfo[playerid][pWatch] = 0;
strmid(PlayerInfo[playerid][pNote1], "None", 0, strlen("None"), 255);
PlayerInfo[playerid][pNote1s] = 0;
strmid(PlayerInfo[playerid][pNote2], "None", 0, strlen("None"), 255);
PlayerInfo[playerid][pNote2s] = 0;
strmid(PlayerInfo[playerid][pNote3], "None", 0, strlen("None"), 255);
PlayerInfo[playerid][pNote3s] = 0;
strmid(PlayerInfo[playerid][pNote4], "None", 0, strlen("None"), 255);
PlayerInfo[playerid][pNote4s] = 0;
strmid(PlayerInfo[playerid][pNote5], "None", 0, strlen("None"), 255);
PlayerInfo[playerid][pNote5s] = 0;
PlayerInfo[playerid][pLighter] = 0;
PlayerInfo[playerid][pCigarettes] = 0;
PlayerInfo[playerid][pMask] = 0;
Masked[playerid] = 0;
PlayerInfo[playerid][pHideNumber] = 0;
PlayerInfo[playerid][pSpeaker] = 0;
PlayerInfo[playerid][pLocked] = 0;
//PlayerInfo[playerid][pMysqlID] = 0;
HouseEntered[playerid] = 0;
pCPID[playerid] = -1;
for(new cp; cp < MAX_PLAYER_CPS; cp++)
{
pCPPosX[playerid][cp] = 0.0;
pCPPosY[playerid][cp] = 0.0;
pCPPosZ[playerid][cp] = 0.0;
pCPSize[playerid][cp] = 0.0;
pCPShow[playerid][cp] = false;
}
TogglePlayerSpectating(playerid, 1);
SetTimerEx("Camerareq", 500, false, "i", playerid);
new query[528];
new utilizator[MAX_PLAYER_NAME + 10];
GetPlayerName(playerid, utilizator, MAX_PLAYER_NAME + 10);
mysql_format(mysql, query, sizeof(query),"SELECT * FROM `players` WHERE `Name` = '%s'", utilizator);
mysql_tquery(mysql, query, "OnAccountCheck", "i", playerid);
//
// Map icons
SetPlayerMapIcon( playerid, 1, 2045.9796,-1913.2120,13.5469, 24 , 0 , MAPICON_LOCAL); //ds
SetPlayerMapIcon( playerid, 2, 1555.5054,-1675.6747,16.1953, 30 , 0 , MAPICON_LOCAL); //lspd
SetPlayerMapIcon( playerid, 3, 1451.0287,-2287.1658,13.5469, 55 , 0 , MAPICON_LOCAL); //dmv
new pickupid = 4;
new map;
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if(BizzInfo[i][bEntranceX])
{
pickupid ++;
if(BizzInfo[i][bType] == 1) { map = 17; }
if(BizzInfo[i][bType] == 2) { map = 6; }
if(BizzInfo[i][bType] == 3) { map = 56; }
if(BizzInfo[i][bType] == 4) { map = 10; }
if(BizzInfo[i][bType] == 5) { map = 52; }
if(BizzInfo[i][bType] == 6) { map = 45; }
if(BizzInfo[i][bType] == 7) { map = 49; }
SetPlayerMapIcon( playerid, pickupid , BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ], map , 0 , MAPICON_LOCAL); //lspd
}
}
return 1;
}
OnPlayerSpawn:
Код:
public OnPlayerSpawn(playerid)
{
SetColor(playerid);
EventSpeak[playerid] = 0;
//TogglePlayerSpectating(playerid, 0);
SetareSpawnBeginner(playerid);
new skinid = GetFactionSkin(playerid);
SetPlayerSkin(playerid, skinid);
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
if(IsSpawnedServer[playerid] != 1)
{
Kick(playerid);
}
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
}
SetPlayerArmour(playerid, 0);
SetPlayerVirtualWorld(playerid, 0), SetPlayerInterior(playerid, 0);
ResetPlayerWeapons(playerid);
if(PlayerInfo[playerid][pBody] != 0) { AttachObjectCorrectly(playerid, PlayerInfo[playerid][pBody]); }
if(PlayerInfo[playerid][pFace] != 0) { AttachObjectCorrectly(playerid, PlayerInfo[playerid][pFace]); }
if(PlayerInfo[playerid][pHead] != 0) { AttachObjectCorrectly(playerid, PlayerInfo[playerid][pHead]); }
if(PlayerInfo[playerid][pJailed] == 1)
{
if(IsBlooding[playerid] == 1)
{
IsBlooding[playerid] =0;
}
SetPlayerSkin(playerid, 62);
SetPlayerInterior(playerid,6);
new Random = random(sizeof(RandomSpawnsJail));
SPP(playerid, RandomSpawnsJail[Random][0], RandomSpawnsJail[Random][1], RandomSpawnsJail[Random][2]);
WaitIntrare(playerid);
return 1;
}
if(IsBlooding[playerid] == 1)
{
SetColor(playerid);
SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
ResetPlayerWeapons(playerid);
SetPlayerVirtualWorld(playerid, BloodW[playerid]);
SetPlayerInterior(playerid, 18 );
new Random = random(sizeof(RandomSpawnsBlood));
SPP(playerid, RandomSpawnsBlood[Random][0], RandomSpawnsBlood[Random][1], RandomSpawnsBlood[Random][2]);
if(BloodPersonalized == 1)
{
GivePlayerWeapon(playerid, BloodWeaponID, 5000);
}
else
{
GivePlayerWeapon(playerid, 5, 20);
GivePlayerWeapon(playerid, 23, 5000);
GivePlayerWeapon(playerid, 24, 5000);
GivePlayerWeapon(playerid, 28, 5000);
GivePlayerWeapon(playerid, 30, 5000);
GivePlayerWeapon(playerid, 31, 5000);
GivePlayerWeapon(playerid, 33, 5000);
}
SetPlayerHealth(playerid , 100);
SetPlayerArmour(playerid , 0);
return 1;
}
if(SpawnChange[playerid] == 3)
{
if(PlayerInfo[playerid][pPhousekey] != 0)
{
new hid = PlayerInfo[playerid][pPhousekey];
SetPlayerInterior(playerid,HouseInfo[hid][hInt]);
SetPlayerVirtualWorld(playerid,hid);
SPP(playerid,HouseInfo[hid][hExitx],HouseInfo[hid][hExity],HouseInfo[hid][hExitz]);
HouseEntered[playerid] = hid;
if(HouseInfo[hid][hMP3Started] == 1)
{
if(HouseMP3[playerid] != HouseEntered[playerid])
{
PlayAudioStreamForPlayer(playerid, HouseInfo[HouseEntered[playerid]][hMp3Link]);
HouseMP3[playerid] = hid;
}
}
return 1;
}
}
if(SpawnChange[playerid] == 2)
{
if(PlayerInfo[playerid][pMember] != 0)
{
FactionEntered[playerid] = 1;
if(PlayerInfo[playerid][pMember] == 1)
{
GivePlayerWeapon(playerid, 3, 1);
SetPlayerInterior(playerid,6);
SPP(playerid, 256.6005,69.4457,1003.6406);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 100.0), SetPlayerArmour(playerid, 100.0);
return 1;
}
if(PlayerInfo[playerid][pMember] == 2)
{
SetPlayerInterior(playerid,3);
SPP(playerid, 366.6242, 198.1266, 1008.2805);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 100.0);
return 1;
}
if(PlayerInfo[playerid][pMember] == 3)
{
SetPlayerInterior(playerid,18);
SPP(playerid, 1710.433715,-1669.379272,20.225049 );
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 100.0);
return 1;
}
if(PlayerInfo[playerid][pMember] == 4)
{
SetPlayerInterior(playerid,3);
SPP(playerid, 1491.5062, 1306.1580, 1093.0013);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 4003);
GivePlayerWeapon(playerid, 43, 50400);
SetPlayerHealth(playerid, 100.0);
return 1;
}
if(PlayerInfo[playerid][pMember] == 5)
{
new ix = playerid;
ShowGangs(ix);
if(WarState == 1)
{
for(new id = 1; id < sizeof(GangInfo); id++)
{
if(WarTurfID == id)
{
GangZoneFlashForPlayer(playerid, GangInfo[id][Turf], COLOR_LIGHTRED);
}
}
TextDrawShowForPlayer(playerid, WarScore);
}
SetPlayerInterior(playerid,3);
SPP(playerid, 2496.049804,-1695.238159,1014.742187);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 4004);
SetPlayerHealth(playerid, 100.0);
return 1;
}
if(PlayerInfo[playerid][pMember] == 6)
{
new ix = playerid;
ShowGangs(ix);
if(WarState == 1)
{
for(new id = 1; id < sizeof(GangInfo); id++)
{
if(WarTurfID == id)
{
GangZoneFlashForPlayer(playerid, GangInfo[id][Turf], COLOR_LIGHTRED);
}
}
TextDrawShowForPlayer(playerid, WarScore);
}
SetPlayerInterior(playerid,5);
SPP(playerid, 1261.0243,-785.2822,1091.9063);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 4005);
SetPlayerHealth(playerid, 100.0);
return 1;
}
if(PlayerInfo[playerid][pMember] == 7)
{
SetPlayerInterior(playerid,3);
SPP(playerid,-2032.1923, -116.8058, 1034.9807);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 4008);
SetPlayerHealth(playerid, 100.0);
GivePlayerWeapon(playerid,23,500);
GivePlayerWeapon(playerid,34,500);
return 1;
}
if(PlayerInfo[playerid][pMember] == 8)
{
SetPlayerInterior(playerid,5);
SPP(playerid,320.8969, 1120.4020, 1084.0867);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 4009);
SetPlayerHealth(playerid, 100.0);
GivePlayerWeapon(playerid,23,500);
GivePlayerWeapon(playerid,34,500);
return 1;
}
}
}
return 1;
}
SPP function:
Код:
stock SPP(playerid, Float: X, Float: Y, Float: Z)
{
SetPlayerPos(playerid, X,Y,Z);
}