Jump to content
  • 0

Mi se suprapun checkpoint-urile..


TzAkS

Question

Folosesc un FS..care daca te pui pe checkpoint cand esti in masina te duce intr`un anume loc..

Checkpoint-uri folosesc si unele chestii din gm..si cand ma pun pe un checkpoint care nu are legatura cu fs-ul acela,ma duce in locul in care ar trebuii sa ma duca doar la coordonatele din fs..

In fs am codul acesta care trebuie schimbat..

public OnPlayerEnterCheckpoint(playerid)
{
	if(IsPlayerInAnyVehicle(playerid))
	{
		SetPlayerInterior(playerid,1);
		LinkVehicleToInterior(GetPlayerVehicleID(playerid),1);
		SetVehiclePos(GetPlayerVehicleID(playerid),-2042.42,178.59,28.84);
		SetVehicleZAngle(GetPlayerVehicleID(playerid),90.0);
		SetPlayerCameraPos(playerid,-2050.5,176.0,30.0);
		SetPlayerCameraLookAt(playerid,-2042.42,178.59,28.84);


	return 1;
Cum pun coordonatele la checkpointul asta? Pentru ca la linia asta
OnPlayerEnterCheckpoint(playerid)

foloseste orice checkpoint nu doar cel care vreau eu..

gXvsYS
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

SetPlayerCheckpoint(playerid, x,y,z, 5.0);

Nu merge:|..la fel face

SetPlayerCheckpoint era deja..

public OnPlayerConnect(playerid)
{
    PnSCMIndex[playerid] = 1;
	return 1;
}
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid,-2034.6766,179.1898,28.8429,4.5);
	return 1;
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
	if(PlayerSelectVCFM[playerid] == true)
	{
		if(newkeys == KEY_SPRINT)
		{
			TogglePlayerControllable(playerid,1);
			PlayerPlaySound(playerid,SOUND_BUY_CAR_RESPRAY,0.0,0.0,0.0);
			LinkVehicleToInterior(GetPlayerVehicleID(playerid),0);
			SetVehiclePos(GetPlayerVehicleID(playerid),-2034.5001,170.3108,28.5414);
			SetVehicleZAngle(GetPlayerVehicleID(playerid),-90.0);
			SetPlayerInterior(playerid,0);
			SetCameraBehindPlayer(playerid);
			PlayerSelectVCFM[playerid] = false;
			SetPlayerCheckpoint(playerid,-2034.6766,179.1898,28.8429,4.5);
			GameTextForPlayer(playerid,"~g~~h~Resprayed!",5000,3);
			RepairVehicle(GetPlayerVehicleID(playerid));
			for(new i=0;i<130;i++)
			{
				TextDrawHideForPlayer(playerid,PayNSprayColorMenu[i]);
				PnSCMIndex[playerid] = 1;
			}
		}
		else if(newkeys == KEY_SECONDARY_ATTACK)
		{
			TogglePlayerControllable(playerid,1);
			ChangeVehicleColor(GetPlayerVehicleID(playerid),-1,-1);
			LinkVehicleToInterior(GetPlayerVehicleID(playerid),0);
			SetVehiclePos(GetPlayerVehicleID(playerid),-2034.5001,170.3108,28.5414);
			SetVehicleZAngle(GetPlayerVehicleID(playerid),-90.0);
			SetPlayerInterior(playerid,0);
			SetCameraBehindPlayer(playerid);
			PlayerSelectVCFM[playerid] = false;
			SetPlayerCheckpoint(playerid,-2034.6766,179.1898,28.8429,4.5);
			for(new i=0;i<130;i++)
			{
				TextDrawHideForPlayer(playerid,PayNSprayColorMenu[i]);
				PnSCMIndex[playerid] = 1;
			}
		}
	}
	return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
	if(IsPlayerInAnyVehicle(playerid))
	{
		SetPlayerInterior(playerid,1);
		LinkVehicleToInterior(GetPlayerVehicleID(playerid),1);
		SetVehiclePos(GetPlayerVehicleID(playerid),-2042.42,178.59,28.84);
		SetVehicleZAngle(GetPlayerVehicleID(playerid),90.0);
		SetPlayerCameraPos(playerid,-2050.5,176.0,30.0);
		SetPlayerCameraLookAt(playerid,-2042.42,178.59,28.84);
  		SetPlayerCheckpoint(playerid,-2034.6766,179.1898,28.8429,5.0);
		TextDrawShowForPlayer(playerid,PayNSprayColorMenu[0]);
		TextDrawShowForPlayer(playerid,PayNSprayColorMenu[1]);
		for(new i=65;i<129;i++) TextDrawShowForPlayer(playerid,PayNSprayColorMenu[i]);
		TogglePlayerControllable(playerid,0);
		PlayerSelectVCFM[playerid] = true;
	}
	return 1;
}

gXvsYS
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By AlexCelTare
      Salut imi poate spune cineva cum fac atunci cand un player intra intr-un checkpoint, sa ii dea alt checkpoint si tot asa?
       
      Eu am facut asa:
      Dar habar nu am cum sa fac mai multe checkpointuri dupa ce intra intr-unul
       
      new bool:onCheck[MAX_PLAYERS];
      public OnPlayerCommandText(playerid, cmdtext[])
          if (strcmp("/startmission", cmdtext, true, 10) == 0)
          {
              if(IsPlayerInRangeOfPoint(playerid, 3.0, 2333.1101,-1072.5065,1049.0234))
              {
              SetPlayerCheckpoint(playerid, -2130.9629,-2061.5767,63.3069, 3.0);
              onCheck[playerid] = true;
              }
              return 1;
          }
       
      public OnPlayerEnterCheckpoint(playerid)
      {
          if(onCheck[playerid]) // if it's true
          {
              GivePlayerMoney(playerid, 10);
              GameTextForPlayer(playerid,"~g~Mission 1 : Discover Dealership Completed!\nAnd Got +10$",3000,4);
              DisablePlayerCheckpoint(playerid);
              onCheck[playerid] = false;
          }
    • By AntiExE Smk Boss
      Vand panel-uri realizate in VueJS si PHP facute de mine de la 0, pretul poate porni de la 10 euro si sa ajunga pana la 30 in functie de cerintele clientului

      Cum se procedeaza? clientul alege template-ul fac panel-ul clientul imi da bani ii dau panel-ul si am incheiat colaborarea

      Si daca aveti vreun panel cu errori sau etc.. dati-mi pm si va ajut gratis.

      Contact pe instagram: gvng.AntiExE

      poze:





    • By ItzGabi2k
      swapper.pwn(11883) : warning 219: local variable "gString" shadows a variable at a preceding level
      swapper.pwn(13192) : warning 213: tag mismatch: expected tag "bool", but found none ("_")
      liniile 11883-11884:
          new gString[0] = EOS;
          cache_get_field_content(0, "name", gString, MAX_PLAYER_NAME);     
       
      linia 13192:
               CarInfo[id][cRainBow]        = cache_get_field_content_int(0, "RainBow");
    • By GamerulFOX
      Deci, cand intru in primul checkpoint nu imi apare urmatorul ! Imi apare primul dar cand intru in el dispare si nu apare urmatorul !

      https://imgur.com/a/4lUvC4Z
    • By VAurel
      Salut, am incercat si eu pe un gamemode de la 0 sa fac un sistem de job-uri.
      Am facut LoadJobs, functioneaza totul ok, Job-ul se creeaza, Text-ul si Pickup-ul sunt creeate doar ca am o problema, nu apare numele job-ului, aveti mai jos cod-ul si poza.
      forward LoadJobs(); public LoadJobs() { for(new i = 1; i <= cache_num_rows(); i++) { cache_get_value_name_int (0, "ID", JobInfo[i][ID]); cache_get_value_name_float(0, "X", JobInfo[i][LocationX]); cache_get_value_name_float(0, "Y", JobInfo[i][LocationY]); cache_get_value_name_float(0, "Z", JobInfo[i][LocationZ]); cache_get_field_name (0, "Name", JobInfo[i][Name]); Iter_Add(Jobes, i); new gString[200]; format(gString,sizeof(gString),"Job: {cc0000}%s{ffffff}\nWrite {cc0000}(/getjob){ffffff} to get job\nWrite {cc0000}(/quitjob){ffffff} to quit job",JobInfo[i][Name]); joblabel[i] = CreateDynamic3DTextLabel(gString, 0xFFFFFFFF, JobInfo[i][LocationX],JobInfo[i][LocationY],JobInfo[i][LocationZ], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1,20.0 ); CreatePickup(1239, 23, JobInfo[i][LocationX], JobInfo[i][LocationY], JobInfo[i][LocationZ], 0); } printf("Jobs: %d", Iter_Count(Jobes)); return 1; } Daca m-ati putea ajuta as fi tare recunoscator, mersi.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.