Jump to content

Question

Posted

Va Rog mult de Tot ajutatima si pe mine

Folosesc GM Reaven's Roleplay si am 1 Problema la SetPlayerSpawn

In momentu cand se face Tutorialu playeru poate Umbla prins Spawn

Am incercat Toate Metodele de Freez dar nu am reusit va rog mult

uitati si linia SetPlayerSpawn.

[pawn]public SetPlayerSpawn(playerid)

{

new string[128], rand;

if(IsPlayerConnected(playerid))

{

    if(!IsPlayerNPC(playerid))

    {

        if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0)

{

if(PlayerInfo[playerid][pAdminDuty] == 1) return 1;

    if(FirstSpawn[playerid] != 1)

    {

        SetRealMoney(playerid, ScriptMoney[playerid]);

PlayerInfo[playerid][pDeaths] += 1;

SetPlayerHealth(playerid, 50.0);

    SafeSetPlayerInterior(playerid, 3);

        rand = random(sizeof(gMedicSpawns));

SafeSetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player

SetPlayerFacingAngle(playerid, 0);

        TogglePlayerControllable(playerid, 0);

        GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You need to rest now ...", 5000, 3);

        ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);

        if(PlayerInfo[playerid][pRegularRank] == 1)

        {

        SetTimerEx("ReleaseFromHospital", 20000, 0, "i", playerid);

}

else if(PlayerInfo[playerid][pRegularRank] == 2)

        {

        SetTimerEx("ReleaseFromHospital", 17500, 0, "i", playerid);

}

else if(PlayerInfo[playerid][pRegularRank] == 3)

        {

        SetTimerEx("ReleaseFromHospital", 15000, 0, "i", playerid);

}

else if(PlayerInfo[playerid][pAdmin] >= 1)

        {

        SetTimerEx("ReleaseFromHospital", 12500, 0, "i", playerid);

}

else if(PlayerInfo[playerid][pAdmin] >= 4)

        {

        SetTimerEx("ReleaseFromHospital", 10000, 0, "i", playerid);

}

else

{

    SetTimerEx("ReleaseFromHospital", 25000, 0, "i", playerid);

}

        PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);

    return 1;

}

}

    if(PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 3)

{

SetPlayerSkin(playerid, 294);

if(PlayerInfo[playerid][pAdmin] >= 6)

{

SafeResetPlayerWeapons(playerid);

SafeGivePlayerWeapon(playerid, 42, 10000);

SafeGivePlayerWeapon(playerid, 39, 10000);

SafeGivePlayerWeapon(playerid, 38, 10000);

SafeGivePlayerWeapon(playerid, 34, 10000);

SafeGivePlayerWeapon(playerid, 31, 10000);

SafeGivePlayerWeapon(playerid, 29, 10000);

SafeGivePlayerWeapon(playerid, 27, 10000);

SafeGivePlayerWeapon(playerid, 24, 10000);

SafeGivePlayerWeapon(playerid, 40, 1);

SafeGivePlayerWeapon(playerid, 10, 1);

SafeGivePlayerWeapon(playerid, 9, 1);

SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1000);

SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1000);

SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1000);

SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1000);

SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1000);

SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1000);

SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1000);

SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1000);

SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1000);

SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1000);

SetPlayerHealth(playerid, 99999);

SetPlayerArmour(playerid, 99999);

}

}

  if(Spectate[playerid] != 255)

{

    SafeSetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);

    SafeSetPlayerInterior(playerid, Interior[playerid]);

    SetPlayerVirtualWorld(playerid, VirWorld[playerid]);

    if(PlayerInfo[playerid][pAdmin] >= 6)

    {

        if(PlayerInfo[playerid][pAdminDuty] == 1)

        {

    SetPlayerHealth(playerid, SpHealth[playerid]);

    SetPlayerArmour(playerid, SpArmour[playerid]);

}

else

{

SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);

    SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);

}

}

else

{

    SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);

    SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);

}

    SetPlayerWeapons(playerid);

    SetPlayerToTeamColor(playerid);

    Spectate[playerid] = 255;

    TextDrawShowForPlayer(playerid, Textdraw44);

  TextDrawShowForPlayer(playerid, Textdraw45);

TextDrawShowForPlayer(playerid, Textdraw55);

  TextDrawShowForPlayer(playerid, Textdraw51[playerid]);

  TextDrawHideForPlayer(playerid, Textdraw54[playerid]);

  if(PlayerInfo[playerid][pWatch] == 1)

{

TextDrawShowForPlayer(playerid, Textdraw56);

TextDrawShowForPlayer(playerid, Textdraw57);

TextDrawShowForPlayer(playerid, Textdraw58);

}

    return 1;

}

    if(PlayerInfo[playerid][pAndro] == 1)

{

    SendClientMessage(playerid, COLOR_GREY, "US Airlines: Medics Saved You, Returning to Your Trip!");

    SafeSetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);

    SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirWorld]);

    SafeSetPlayerPos(playerid, 315.745,984.969,1958.919);

    return 1;

}

if(PlayerInfo[playerid][pJet] == 1)

{

    SendClientMessage(playerid, COLOR_GREY, "US Airlines: Medics Saved You, Returning to Your Trip!");

  SafeSetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);

    SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirWorld]);

    SafeSetPlayerPos(playerid, 3.7333,23.0483,1199.6012);

    return 1;

}

    if(PlayerInfo[playerid][pTut] == 0)

    {

        printf("freeze");

gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;

SafeSetPlayerInterior(playerid, 14);

SafeSetPlayerPos(playerid, -1829.7950,18.1678,1061.1436);

SetPlayerFacingAngle(playerid, 280);

RegistrationStep[playerid] = 1;

TogglePlayerControllable(playerid, 0);

SendClientMessage(playerid, COLOR_LIGHTRED, "Bun Venit pe servarul nostru, Vei fi dus la centru de inregistrari din Los Santos.");

SendClientMessage(playerid, COLOR_LIGHTRED, "Buna Ziua!Bun venit la centrul de inregistrari, ati vom pune cateva intrebari.");

SendClientMessage(playerid, COLOR_LIGHTRED, "Prima intrebare: Sunteti {2913F0}barbat {49F540}sau {F540F5}femeie?");

SendClientMessage(playerid, COLOR_LIGHTRED, "TIP: Te Rog scrie ce esti! Nu-ti face griji, nimeni nu va vedea!");

PlayerInfo[playerid][pRegularCount] = 144000;

  SafeGivePlayerMoney(playerid,500000);

return 1;

    }

    if(PlayerInfo[playerid][pTutDone] == 0 && PlayerInfo[playerid][pTut] != 0)

    {

SendClientMessage(playerid, COLOR_LIGHTRED, "SFAT: Nu ati citit inca tutorialu!");

SendClientMessage(playerid, COLOR_LIGHTRED, "TIP: /tutorial daca doriti sa cititti tutorialu!");

SendClientMessage(playerid, COLOR_LIGHTRED, "TIP: Prin finisarea tutorialului veti primi 7.500 dolari si -500 minute la intervale regulate!");

}[/pawn]

Respecta si vei fi Respectat

8 answers to this question

Recommended Posts

Posted

Eminem multumesc pt efortu de scriere dar deja am incercat functia aia va rog care ma poate ajuta dau +1 :cry:

Respecta si vei fi Respectat

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.