Jump to content

Wanted la 0 la respawn ? REzolvat


stefanel994

Recommended Posts

PTr cei care aveau problema cu wantedul cand primeai respawn se dadea la 0. Te duci in gamemod si cauti linia

if(newstate == PLAYER_STATE_SPAWNED)
Si aicio sa ai
		new Float: lwx, Float:lwy, Float:lwz;
		GetPlayerPos(playerid, lwx, lwy, lwz);
		if((lwz > 530.0 && PlayerInfo[playerid][pInt] == 0) || PlayerToPoint(1000.0, playerid, -1041.9,-1868.4,79.1)) //the highest land point in sa = 526.8
		{
			SetPlayerSpawn(playerid);
		}
		if(PlayerOnMission[playerid] > 0)
		{
			GameTextForPlayer(playerid, "~r~Mission failed", 5000, 3);
			PlayerOnMission[playerid] = 0;
		    PlayerInfo[playerid][pMissionNr] = 0;
		}
		WantedPoints[playerid] = 0;
		WantedLevel[playerid] = 0;
		if(PlayerInfo[playerid][pDonateRank] > 0) { SetPlayerHealth(playerid, 100.0); }
		else { SetPlayerHealth(playerid, 50.0+PlayerInfo[playerid][pSHealth]); }
		MedicBill[playerid] = 1;
		TelePos[playerid][0] = 0.0;
		TelePos[playerid][1] = 0.0;
		gPlayerSpawned[playerid] = 1;
		SafeTime[playerid] = 60;
	}
	return 1;
}
De aici stergi
		WantedPoints[playerid] = 0;
		WantedLevel[playerid] = 0;
la sfarsit tb sa arate asa
		new Float: lwx, Float:lwy, Float:lwz;
		GetPlayerPos(playerid, lwx, lwy, lwz);
		if((lwz > 530.0 && PlayerInfo[playerid][pInt] == 0) || PlayerToPoint(1000.0, playerid, -1041.9,-1868.4,79.1)) //the highest land point in sa = 526.8
		{
			SetPlayerSpawn(playerid);
		}
		if(PlayerOnMission[playerid] > 0)
		{
			GameTextForPlayer(playerid, "~r~Mission failed", 5000, 3);
			PlayerOnMission[playerid] = 0;
		    PlayerInfo[playerid][pMissionNr] = 0;
		}
		if(PlayerInfo[playerid][pDonateRank] > 0) { SetPlayerHealth(playerid, 100.0); }
		else { SetPlayerHealth(playerid, 50.0+PlayerInfo[playerid][pSHealth]); }
		MedicBill[playerid] = 1;
		TelePos[playerid][0] = 0.0;
		TelePos[playerid][1] = 0.0;
		gPlayerSpawned[playerid] = 1;
		SafeTime[playerid] = 60;
	}
	return 1;
}

Link to comment
Share on other sites

daca mi se permite sa adaug ca sa ramana wantedu si dupa restart la server dupa ce da /q la onplayerconnect aveti linia asta

WantedLevel[playerid] = 0;
linia trebe pusa sub forma de comenzitariu si va deveni
/*WantedLevel[playerid] = 0;*/

nam vreut sa fac alt tutorial daca tot era acesta stefanel994 te rog dati edit la post si pune si sa ramana wantedu permanet daca vrei

Link to comment
Share on other sites

  • 8 months later...

OMG , ati " inviat " un topic de pe vremea lui Mos Craciun nene !

_______________________________________________

Bunicel tutorial .. ( am zis sa nu fac Off )

Asa si care-i problema daca am "reinviat" un topic de nush cand? am facut OFF topic sau reply aiurea? ca spui ca am postat doar ca sa "reinviu" topicu ?

mai bine nu ai mai posta asa aiurea ...

O rezolvare la problema ? trebuie schimbat din playerid in playername sau ceva de genu ... maine daca am timp o sa incerc sa vad ... daca reusesc dau un edit si trec si aici

default.png

 

Link to comment
Share on other sites

ma heker la tine in tutorial nu e fuctional si nu are nici o legatura cu /q la tine save wanted

destept si desteptiilot pentru o salvare mai buna a wantedului salvatil intr-o variabila sau cum este ea WantedLevel simplu

new wakaname[25]; 
GetPlayerName(playerid,wakaname,25);
new str[128];
format(str,128,"UPDATE `tabelul tau` SET `WantedLevel`='%d' WHERE `name`='%s'",WantedLevel(playerid),wakaname);
mysql_query(str);

si gata o.O

Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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