Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Question

Posted

Problema intalnita (descriere): Am casa cumparata dau /changespawn si tot la spawnul obisnuit ma respawneaza . 
Ero(area / rile) / warning-(ul / urile): nu primesc
Liniile de cod / sursa / script-ul(obligatoriu):  

forward LoadPlayerSpawnData(playerid);
public LoadPlayerSpawnData(playerid)
{
	for(new i = 0; i < sizeof(ApartmentInfo); i++)
	{
        GetPlayerName(playerid, plname, sizeof(plname));
        if(strcmp(ApartmentInfo[i][sOwner], plname, false ) == 0 && ApartmentInfo[i][sSpawn] == 1)
        {
            SetPlayerPos(playerid, ApartmentInfo[i][sEnterx],ApartmentInfo[i][sEntery],ApartmentInfo[i][sEnterz]);
        }
	}
	TextDrawShowForPlayer(playerid, ServerTimeTXT);
	SetPlayerInterior(playerid, 0);
	SetPlayerVirtualWorld(playerid, 0);
    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
    SetPlayerPos(playerid, 1743.0449,-1861.1635,13.5779);
    SetPlayerHealth(playerid, 100);
    SetPlayerInterior( playerid, PlayerInfo[playerid][pInterior] );
    SetPlayerVirtualWorld( playerid, PlayerInfo[playerid][pVirtualWorld] );
}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?:  da

9 answers to this question

Recommended Posts

  • 0
Posted

Cred ca, comanda potrivita este /spawnchange nu /changespawn... Da-ne si comanda daca poti, o sa te ajut eu daca lasi comanda aici

  • 0
Posted

care ar fi diferenta dintre spawnchange si changespawn ? :)))

 

CMD:changespawn(playerid, params[]) // change spawn
{
    for(new i = 0; i < sizeof(ApartmentInfo); i++)
    {
    GetPlayerName(playerid, plname, sizeof(plname));
    if(strcmp(ApartmentInfo[i][sOwner], plname, false ) == 0)
    {
    if(ApartmentInfo[i][sSpawn] == 1)
   	{
    	ApartmentInfo[i][sSpawn] = 0;
    	SendClientMessage(playerid, YELLOW, "Now you will not spawn in apartment.");
    	SaveApartment(i);
    	return 1;
    	}
    	if(ApartmentInfo[i][sSpawn] == 0)
                    {
                    ApartmentInfo[i][sSpawn] = 1;
                    SendClientMessage(playerid, YELLOW, "From now, you will spawn in apartment!");
                    SaveApartment(i);
                    return 1;
    	}
    	return 1;
   	}
   	}
    return 1;
}

 

  • 0
  • 0
Posted

nu merge WiduAlk

Acum 25 minute, WiDuAlK a spus:

eu stiu ca verificarea e ceva de genu:


if(strcmp(ApartmentInfo[i][sOwner], plname, true ) == 0)

nu

if(strcmp(ApartmentInfo[sOwner], plname, false) == 0)

modifica si vezi daca iti merge

 

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.