Jump to content
  • 0

Problema SetPlayerSpawn


kata21

Question

Buna ziua,

Sa o iau cu inceputul.

Am facut spawnurile pentru factiuni dar cand intru pe server ma da in locul de deconectare si daca dau /respawn ma da unde eram cu 5 sec inainte.

[pawn]public SetPlayerSpawn(playerid)

{

if(IsPlayerConnected(playerid))

{

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

    {

        SetPlayerPos(playerid, 1733.1367,-1911.9568,13.5621);

    }

if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)

{

    SetPlayerPos(playerid, 1530.1512,-1668.0510,6.2188);/* Police Department*/

GivePlayerWeapon(playerid, 24, 150);

GivePlayerWeapon(playerid, 31, 100);

GivePlayerWeapon(playerid, 30, 100);

GivePlayerWeapon(playerid, 29, 500);

GivePlayerWeapon(playerid, 26, 500);

SetPlayerHealth(playerid, 100);

SetPlayerArmour(playerid, 200);

}

if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)

{

    SetPlayerPos(playerid, 395.8242,-1155.4259,1234.8639);/*FBI*/

GivePlayerWeapon(playerid, 24, 150);

SetPlayerHealth(playerid, 100);

SetPlayerArmour(playerid, 200);

}

if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)

{

    SetPlayerPos(playerid, 324.9394,309.0272,999.1484);/*GABOII*/

GivePlayerWeapon(playerid, 24, 150);

SetPlayerHealth(playerid, 100);

SetPlayerArmour(playerid, 200); //departament of correction ce id au 10 si? 8

}

if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)

{

    SetPlayerPos(playerid, 1865.0272,-1725.1395,5202.5859);/*Factiunea ID:4*/

GivePlayerWeapon(playerid, 24, 150);

SetPlayerHealth(playerid, 100);

SetPlayerArmour(playerid, 200); //departament of correction ce id au 10 si? 8

}[/pawn]

Faza cu departament sunt puse la misto. Nu gasesc nimic defect in ele poate ma ajutati voi...

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Folosste modelul acesta :

[pawn] if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn

{

    SetPlayerToTeamColor(playerid);

    SetPlayerInterior(playerid, 0);

    SetPlayerPos(playerid, -1346.2050,492.3983,11.2027);

    PlayerInfo[playerid][pInt] = 0;

    return 1;

}[/pawn]

Inlocuieste cu setariile de baza , gen SetPlayerPos - setezi pozitia .

Am vazut la codul tau ca ai acolo

[pawn]GivePlayerWeapon(playerid, 24, 150);[/pawn]

Adaugal si pe ala tot acolo .

Invat ca sa Invat.

Link to comment
Share on other sites

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.