Jump to content

Cerere comanda /spawnhere


Nigga
 Share

Recommended Posts

  • Administrator
YCMD:spawnhere( playerid, params[], help )
{

	if( PlayerInfo[ playerid ][ pHelper ] < 2 && PlayerInfo[ playerid ][ pAdmin ] < 1) return SendClientMessage( playerid, 0xAFAFAFAA, "Nu detii un grad administrativ pentru a putea folosii aceasta comanda." ); 

	new userID;

	if( sscanf( params, "u", userID ) ) return SendClientMessage( playerid, -1, "Usage: /spawnhere <playerid/name>" );
	if( userID == INVALID_PLAYER_ID || !IsPlayerConnected( userID ) ) return SendClientMessage( playerid, -1, "Acel jucator nu este conectat." );

	foreach( new x : Player )
	{
		if( PlayerInfo[ x ][ pAdmin ] >= 1 )
		{
			SendClientMessage( x, 0xE6833CFF, "AdmInfo: %s has spawned %s and restored his position.", GetName( playerid ), GetName( userID ) );
		}
	}

	new string[ 128 ];

	format( string, sizeof string, "L-ai respawnat pe jucatorul %s si i-ai resetat pozitia initiala.", GetName( userID ) );
	SendClientMessage( playerid, -1, string );

	format( string, sizeof string, "Administratorul %s te-a respawnat si ti-a resetat pozitia initiala.", GetName( playerid ) );
	SendClientMessage( userID, -1, string );	

	new Float: pozitieX, Float: pozitieY, Float: pozitieZ;

	GetPlayerPos( userID, pozitieX, pozitieY, pozitieZ );

	SpawnPlayer( userID );

	SetTimerEx( "SpawnHere", 1000, 0, "dfffii", userID, pozitieX, pozitieY, pozitieZ, GetPlayerInterior( userID ), GetPlayerVirtualWorld( userID ) );

	return true;
}

function SpawnHere( playerid, Float: x, Float: y, Float: z, interior, virtualworld )
{

	SetPlayerPos( playerid, pozitieX, pozitieY, pozitieZ );
	SetPlayerInterior( playerid, interior );
	SetPlayerVirtualWorld( playerid, virtualworld );

	return true;
}

:wink:

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...