[HELP] How do i make this one? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] How do i make this one? (
/showthread.php?tid=130189)
[HELP] How do i make this one? -
WThieves - 25.02.2010
Hi there,
I have a problem, I want to make this: (spoiler: this uses interriors)
If a player is in virtualworld number 1 and near point 756989,1240.000000,1082.149902
then when he pushes secondairy fire it makes him go to point 932.67,2215.2,11.48,225
And if a player is in virtualworld number 2 and near point 756989,1240.000000,1082.149902
then when he pushes secondairy fire it makes him go to point 967.43,2214.36,11.46
I know how to make this a little bit but i don't know how to insert the virtual world thingy
I have something like this:
pawn Код:
if (PlayerToPoint(3.0, playerid,756989,1240.000000,1082.149902))
{
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
SetPlayerPos(playerid,932.67,2215.2,11.48,225);
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
}
but where do i need to put the virtualworld is 1 or 2
Re: [HELP] How do i make this one? -
Torran - 25.02.2010
I dont think this solves your problem but im just going to say.
Use
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Its better and faster than PlayerToPoint
Re: [HELP] How do i make this one? -
Miguel - 25.02.2010
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkey & KEY_SECONDARY_ATTACK)
{
if(GetPlayerVirtualWorld(playerid) == puttheworldhere)
{
//code (range check)
}
else if(GetPlayerVirtualWorld(playerid) == putthesecondworldhere)
{
// code (range check)
}
}
return 1;
}
Re: [HELP] How do i make this one? -
WThieves - 25.02.2010
Quote:
Originally Posted by SAWC™
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkey & KEY_SECONDARY_ATTACK) { if(GetPlayerVirtualWorld(playerid) == puttheworldhere) { //code (range check) } else if(GetPlayerVirtualWorld(playerid) == putthesecondworldhere) { // code (range check) } } return 1; }
|
Thanks!!