PDA

View Full Version : 2 Questions, Didn't find them on ******.


MAFIAWARS
27/09/2013, 09:33 AM
Question #1

I want that, When I press ESC and then Go to MAP and then Press Left Mouse Button (LMB) to put a Mark in the Map and It teleports me there, where I put'ed it. It is Possible I know. tell me how can I do that?

Question #2

I want to create the Virtual World, How can I create it? I made Command to go in the Virtual Word and here it is


CMD:eworld(playerid, params[])
{
if( AdminLevel(playerid)<1 )return 0;
if (GetPlayerVirtualWorld(playerid)==1) return SendClientMessage (playerid, COLOR_ORANGE, "[ ! ] You are already in the Event World" );
EventPlayerEnter( playerid, false );
SendClientMessage (playerid, COLOR_ORANGE, "[ ! ] You are now in Event Zone" );
SendClientMessage (playerid, COLOR_ORANGE, "[ ! ] Welcome to Event World" );
return 1;
}


P.S: /spec and /specoff Command Needed Please.

Konstantinos
27/09/2013, 09:36 AM
#1 OnPlayerClickMap (http://wiki.sa-mp.com/wiki/OnPlayerClickMap)

#2 Do you want to know how to set the virtual world to a player? I doubt you found nothing about it on ******. SetPlayerVirtualWorld (http://wiki.sa-mp.com/wiki/SetPlayerVirtualWorld)

Axey187
27/09/2013, 09:36 AM
<Remove>

Axey187
27/09/2013, 09:41 AM
P.S: /spec and /specoff Command Needed Please.
Go here (forum.sa-mp.com/showthread.php?p=1531941#post1531941) for informations about how to make a simple /spec command

MAFIAWARS
27/09/2013, 10:28 AM
Go here (forum.sa-mp.com/showthread.php?p=1531941#post1531941) for informations about how to make a simple /spec command

Thank you Dear, /spec and /specoff Command Working. But, When I am spectating a Player and doing /specoff, I respawn instead of spawn on that Place where I start Spectating.

An Another Problem is that, I can only do /spec once, When I am doing /spec (second time), It is Sending me Client Message that "You already spectating someone".

LOL

Any Help Please?

Konstantinos
27/09/2013, 10:32 AM
When you disable the spectate, it respawns the player automatically. You'll need to store the player's position while executing /spec command and after they do /specoff, it will re-spawn them. You'll need to add in OnPlayerSpawn to set the position to the last saved one.

It's supposed that you need to do /specoff first and then /spec to spectate another player. It's not that difficult to remove that line and re-spectate the new player!

MAFIAWARS
27/09/2013, 10:41 AM
Thank you for helping in /spec :)

Now Tell me How can I save the last Position of the Player?

Konstantinos
27/09/2013, 10:54 AM
new
Float: Save_Position[ MAX_PLAYERS ][ 4 ],
bool: InSpectate[ MAX_PLAYERS char ]
;

// OnPlayerConnect:
Save_Position[ playerid ][ 0 ] = 0.0;
Save_Position[ playerid ][ 1 ] = 0.0;
Save_Position[ playerid ][ 2 ] = 0.0;
Save_Position[ playerid ][ 3 ] = 0.0;

InSpectate{ playerid } = false;

// OnPlayerSpawn:
if( InSpectate{ playerid } )
{
SetPlayerPos( playerid, Save_Position[ playerid ][ 0 ], Save_Position[ playerid ][ 1 ], Save_Position[ playerid ][ 2 ] );
SetPlayerFacingAngle( playerid, Save_Position[ playerid ][ 3 ] );
InSpectate{ playerid } = false;
}

// Command /spec
GetPlayerPos( playerid, Save_Position[ playerid ][ 0 ], Save_Position[ playerid ][ 1 ], Save_Position[ playerid ][ 2 ] );
GetPlayerFacingAngle( playerid, Save_Position[ playerid ][ 3 ] );
InSpectate{ playerid } = true;

MAFIAWARS
27/09/2013, 11:03 AM
Thank you Very MUCH <3 <3

MAFIAWARS
27/09/2013, 11:05 AM
Ah ! One more thing to ask, I have a Spawn Command but I can only Spawn Vehicle with its name, not from ID.

I want to Spawn with a Vehicle ID.
Thanks in Advance my Friend :)

Konstantinos
27/09/2013, 11:09 AM
http://forum.sa-mp.com/showpost.php?p=2710957&postcount=3

MAFIAWARS
27/09/2013, 11:16 AM
Thank you ! But I want that I can only use this Command in Virtual World...

Konstantinos
27/09/2013, 11:22 AM
I cannot read your mind.. in order to make exactly what you want.


if( GetPlayerVirtualWorld( playerid ) != N ) return SendClientMessage( playerid, -1, "You can only use this command in virtual world N" );
// CHANGE N to the virtual world you want