No MySQL Is used, at all.
Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "intro", true))
{
PutPlayerInVehicle(playerid, introplane, 0);
SetPlayerArmour(playerid, 0);
SetPlayerColor(playerid, COLOR_WHITE);
}
return 1;
}
/*if(PlayerInfo[playerid][pJailed] == 1) //The yellow screen bug.
{
SetPlayerSpawn(playerid);
return 1;
}*/
if(PlayerInfo[playerid][pBackPack] == 0)
{
PlayerInfo[playerid][pSlots] = 20;
}
if(PlayerInfo[playerid][pBackPack] == 1)
{
PlayerInfo[playerid][pSlots] = 50;
SetPlayerAttachedObject(playerid, 1, 363, 1, 0.300000, -0.14,0.2, 0.000000, 90, 359.5022,1,1,1);
}
if(PlayerInfo[playerid][pBackPack] == 2)
{
PlayerInfo[playerid][pSlots] = 100;
SetPlayerAttachedObject(playerid, 1, 363, 1, 0.300000, -0.14,0.2, 0.000000, 90, 359.5022,1,1,1);
}
if(PlayerInfo[playerid][pBackPack] == 3)
{
PlayerInfo[playerid][pSlots] = 150;
SetPlayerAttachedObject(playerid, 1, 363, 1, 0.300000, -0.14,0.2, 0.000000, 90, 359.5022,1,1,1);
}
freeze(playerid);
onduty[playerid] = 0;
Delete3DTextLabel(Text3D:label[playerid]);
hungertimer[playerid] = SetTimerEx("hunger", 1200000, true, "i", playerid);
thirsttimer[playerid] = SetTimerEx("thirsty", 1200000, true, "i", playerid);
if(PlayerInfo[playerid][pSurvivors] == 1)
{
if(FirstSpawn[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You'll get kicked so your account is saved!");
PlayerInfo[playerid][pPos_x] = 210.1676;
PlayerInfo[playerid][pPos_y] = -225.8301;
PlayerInfo[playerid][pPos_z] = 1.7786;
FirstSpawn[playerid] = 0;
PlayerInfo[playerid][pGun] = 0;
PlayerInfo[playerid][pGun2] = 0;
PlayerInfo[playerid][pGun3] = 0;
PlayerInfo[playerid][pGun4] = 0;
PlayerInfo[playerid][pGun5] = 0;
GivePlayerWeapon(playerid, 0, 1);
Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
ShowProgressBarForPlayer(playerid, Hunger[playerid]);
ShowProgressBarForPlayer(playerid, Thirst[playerid]);
Hungry[playerid] = 0;
Thirsty[playerid] = 0;
PlayerInfo[playerid][pFish] = 0;
PlayerInfo[playerid][pWater] = 0;
PlayerInfo[playerid][pMatches] = 0;
PlayerInfo[playerid][pFishDone] = 0;
PlayerInfo[playerid][pMute] = 0;
PlayerInfo[playerid][pRmute] = 0;
PlayerInfo[playerid][pJailed] = 0;
PlayerInfo[playerid][pJailTime] = 0;
PlayerInfo[playerid][pRespect] = 0;
PlayerInfo[playerid][pCoOwner] = 0;
PlayerInfo[playerid][pVip] = 0;
PlayerInfo[playerid][pWalkieTalkie] = 0;
PlayerInfo[playerid][pWalkieBroken] = 0;
PlayerInfo[playerid][pChoosenTeam] = 0;
PlayerInfo[playerid][pRelationShip] = 0;
PlayerInfo[playerid][pFishingNet] = 0;
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pWaterBottle] = 0;
PlayerInfo[playerid][pCheckedBox] = 0;
PlayerInfo[playerid][pBackPackType] = 0;
PlayerInfo[playerid][pFishingNet] = 0;
PlayerInfo[playerid][pFishingRod] = 0;
PlayerInfo[playerid][pSlots] = 20;
SendClientMessage(playerid, COLOR_GREEN, "I see you are new here, Use (/n)ewbie to ask any questions");
}
else if(FirstSpawn[playerid] == 0)
{
new gun = PlayerInfo[playerid][pGun];
new gun2 = PlayerInfo[playerid][pGun2];
new gun3 = PlayerInfo[playerid][pGun3];
new gun4 = PlayerInfo[playerid][pGun4];
new gun5 = PlayerInfo[playerid][pGun5];
SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
ShowProgressBarForPlayer(playerid, Hunger[playerid]);
ShowProgressBarForPlayer(playerid, Thirst[playerid]);
Hungry[playerid] = 0;
Thirsty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
GivePlayerWeapon(playerid, gun, 1);
GivePlayerWeapon(playerid, gun2, 500);
GivePlayerWeapon(playerid, gun3, 500);
GivePlayerWeapon(playerid, gun4, 500);
GivePlayerWeapon(playerid, gun5, 500);
SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
SendClientMessage(playerid, COLOR_WHITE, "Welcome back to Fallout Roleplay! Enjoy your stay!");
return 1;
}
if(PlayerInfo[playerid][pVip] > 0)
{
if(PlayerInfo[playerid][pSurvivors] == 1)
{
new vtext[20];
if(PlayerInfo[playerid][pVip] == 1) { vtext = "Bronze Vip"; }
else if(PlayerInfo[playerid][pVip] == 2) { vtext = "Silver Vip"; }
else if(PlayerInfo[playerid][pVip] == 3) { vtext = "Gold Vip"; }
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string),"Welcome back %s! You are a %s! Thank you for donating. You are spawning with a knife!",name,vtext);
SendClientMessage(playerid, COLOR_WHITE,string);
new gun = PlayerInfo[playerid][pGun];
PlayerInfo[playerid][pGun] = 4;
GivePlayerWeapon(playerid, gun, 1);
SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
ShowProgressBarForPlayer(playerid, Hunger[playerid]);
ShowProgressBarForPlayer(playerid, Thirst[playerid]);
Hungry[playerid] = 0;
Thirsty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
return 1;
}
if(PlayerInfo[playerid][pVip] > 1)
{
if(PlayerInfo[playerid][pOthers] == 1)
{
new vtext[20];
if(PlayerInfo[playerid][pVip] == 1) { vtext = "Bronze Vip"; }
else if(PlayerInfo[playerid][pVip] == 2) { vtext = "Silver Vip"; }
else if(PlayerInfo[playerid][pVip] == 3) { vtext = "Gold Vip"; }
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string),"Welcome back %s! You are a %s! Thank you for donating. You are spawning with a knife!",name,vtext);
SendClientMessage(playerid, COLOR_WHITE,string);
new gun = PlayerInfo[playerid][pGun];
PlayerInfo[playerid][pGun] = 4;
GivePlayerWeapon(playerid, gun, 1);
SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
ShowProgressBarForPlayer(playerid, Hunger[playerid]);
ShowProgressBarForPlayer(playerid, Thirst[playerid]);
Hungry[playerid] = 0;
Thirsty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
return 1;
}
}
}
}
if(PlayerInfo[playerid][pOthers] == 1)
{
if(FirstSpawn[playerid] == 1)
{
PlayerInfo[playerid][pPos_x] = 210.1676;
PlayerInfo[playerid][pPos_y] = -225.8301;
PlayerInfo[playerid][pPos_z] = 1.7786;
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
FirstSpawn[playerid] = 0;
PlayerInfo[playerid][pGun] = 0;
Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
ShowProgressBarForPlayer(playerid, Hunger[playerid]);
ShowProgressBarForPlayer(playerid, Thirst[playerid]);
Hungry[playerid] = 0;
Thirsty[playerid] = 0;
PlayerInfo[playerid][pGun] = 0;
PlayerInfo[playerid][pWalkieTalkie] = 1;
SendClientMessage(playerid, COLOR_WHITE, "You have a walkie talkie, Use (/w)alkietalkie to use it!");
SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
GivePlayerWeapon(playerid, 0, 1);
PlayerInfo[playerid][pFish] = 0;
PlayerInfo[playerid][pWater] = 0;
PlayerInfo[playerid][pMatches] = 0;
PlayerInfo[playerid][pFishDone] = 0;
PlayerInfo[playerid][pMute] = 0;
PlayerInfo[playerid][pRmute] = 0;
PlayerInfo[playerid][pJailed] = 0;
PlayerInfo[playerid][pJailTime] = 0;
PlayerInfo[playerid][pRespect] = 0;
PlayerInfo[playerid][pCoOwner] = 0;
PlayerInfo[playerid][pVip] = 0;
PlayerInfo[playerid][pWalkieTalkie] = 0;
PlayerInfo[playerid][pWalkieBroken] = 0;
PlayerInfo[playerid][pChoosenTeam] = 0;
PlayerInfo[playerid][pRelationShip] = 0;
PlayerInfo[playerid][pFishingNet] = 0;
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pWaterBottle] = 0;
PlayerInfo[playerid][pCheckedBox] = 0;
PlayerInfo[playerid][pBackPackType] = 0;
PlayerInfo[playerid][pFishingNet] = 0;
PlayerInfo[playerid][pFishingRod] = 0;
PlayerInfo[playerid][pGun] = 0;
PlayerInfo[playerid][pGun2] = 0;
PlayerInfo[playerid][pGun3] = 0;
PlayerInfo[playerid][pGun4] = 0;
PlayerInfo[playerid][pGun5] = 0;
SendClientMessage(playerid, COLOR_GREEN, "I see you are new here, Use (/n)ewbie to ask any questions");
PlayerInfo[playerid][pSlots] = 20;
}
else if(FirstSpawn[playerid] == 0)
{
new gun = PlayerInfo[playerid][pGun];
new gun2 = PlayerInfo[playerid][pGun2];
new gun3 = PlayerInfo[playerid][pGun3];
new gun4 = PlayerInfo[playerid][pGun4];
new gun5 = PlayerInfo[playerid][pGun5];
SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
Thirst[playerid] = CreateProgressBar(549.00, 51.00, 57.50, 3.20, -1378294017, 100.0);
ShowProgressBarForPlayer(playerid, Hunger[playerid]);
ShowProgressBarForPlayer(playerid, Thirst[playerid]);
Hungry[playerid] = 0;
Thirsty[playerid] = 0;
SetPlayerColor(playerid, COLOR_WHITE);
GivePlayerWeapon(playerid, gun, 1);
GivePlayerWeapon(playerid, gun2, 500);
GivePlayerWeapon(playerid, gun3, 500);
GivePlayerWeapon(playerid, gun4, 500);
GivePlayerWeapon(playerid, gun5, 500);
SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
SendClientMessage(playerid, COLOR_WHITE, "Welcome back to Fallout Roleplay! Enjoy your stay!");
}
}
return 1;
}