Jail place
#1

please i need a jail Position
+ interior id
Reply
#2

may it can help you
Код:
CMD:jail(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 1)
	{
		new
			iTargetID,
			szReason[64];

		if(sscanf(params, "us[64]", iTargetID, szReason)) {
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /jail [playerid/partofname] [reason]");
		}
		else if(IsPlayerConnected(iTargetID)) {
			if(AdminDuty[iTargetID] == 1) {
				return SendClientMessage(playerid, COLOR_WHITE, "You can't perform this action on on-duty admins.");
			}
			if(PlayerInfo[iTargetID][pAdmin] >= PlayerInfo[playerid][pAdmin]) {
				return SendClientMessage(playerid, COLOR_WHITE, "You can't perform this action on equal or higher admins.");
			}

			//if(GetPVarInt(iTargetID, "PBM") > 0) LeavePaintballArena(iTargetID, GetPVarInt(iTargetID, "IsInArena"));

			new
				szMessage[128];

			ResetPlayerWeaponsEx(iTargetID);
            if(PlayerDraggedBy[iTargetID] != INVALID_PLAYER_ID) {
				IsCopDragging[PlayerDraggedBy[iTargetID]] = INVALID_PLAYER_ID;
				PlayerDragged[iTargetID] = 0;
				PlayerDraggedBy[iTargetID] = INVALID_PLAYER_ID;
			}
			if(IsPlayerAttachedObjectSlotUsed(iTargetID, 0))
				RemovePlayerAttachedObject(iTargetID, 0);
			PlayerInfo[iTargetID][pJailed] = 3;
			PhoneOnline[iTargetID] = 1;
			PlayerInfo[iTargetID][pJailTime] = 10*60;

		    TogglePlayerControllable(iTargetID, 0);
			for(new o = 0; o < 6; o++)
			{
				TextDrawShowForPlayer(iTargetID, ObjectsLoadingTD[o]);
			}
			SetPVarInt(iTargetID, "LoadingObjects", 1);
   			SetTimerEx("SafeLoadObjects", 3000, 0, "d", iTargetID);

			SetPlayerInterior(iTargetID, 69);
			PlayerInfo[iTargetID][pVW] = 696969;
			PlayerInfo[iTargetID][pInt] = 69;
			SetPlayerVirtualWorld(iTargetID, 696969);
			new rand = random(sizeof(AdminPrisonFloat));
			SetPlayerPos(iTargetID, AdminPrisonFloat[rand][0], AdminPrisonFloat[rand][1], AdminPrisonFloat[rand][2]);

			format(szMessage, sizeof(szMessage), "AdmCmd: %s has been jailed by %s, reason: %s", GetPlayerNameEx(iTargetID), GetPlayerNameEx(playerid), szReason);
			SendClientMessageToAllEx(COLOR_LIGHTRED, szMessage);

			format(szMessage, sizeof(szMessage), "AdmCmd: %s has been jailed by %s, reason: %s", GetPlayerNameEx(iTargetID), GetPlayerNameEx(playerid), szReason);
			Log("logs/admin.log", szMessage);

			format(szMessage, sizeof(szMessage), "You have been jailed by Admin %s for 20 minutes, reason: %s.", GetPlayerNameEx(playerid), szReason);
			SendClientMessage(iTargetID, COLOR_LIGHTBLUE, szMessage);

			format(szMessage, sizeof(szMessage), "%s", szReason);
			SendClientMessage(iTargetID, COLOR_LIGHTBLUE, szMessage);

			strcpy(PlayerInfo[iTargetID][pPrisonedBy], GetPlayerNameEx(playerid), MAX_PLAYER_NAME);
			strcpy(PlayerInfo[iTargetID][pPrisonReason], szReason, 128);
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
		}
	}
	return 1;
}
Reply
#3

really?
Reply
#4

The client has built-in commands for you.

/save
/save is most likely the most commonly used default command, and probably the most useful. When you type /save, your current position is saved to savedpositions.txt in your user files directory, from where you can use it in scripts.
/rs
/rs (Raw Save) is like /save, but it only saves your current position and facing angle in rawpositions.txt in your user files directory. No extra information is saved such as class and weapons.
/interior
Partly as important as /save, this command simply displays your current interior in chat.
Reply
#5

ye there is jail position plus int
Reply
#6

yes i'll try it Thank you
Reply
#7

PHP код:
new Float:JailCoord[][] =
{
    {
198.310134161.9854121003.029968177.840881},
    {
197.993942175.2985681003.0234371.020530},
    {
193.767562175.5451041003.023437357.556182}
};
//for setting position
    
new rand random(sizeof(JailCoord));
        
SetPlayerPosEx(playerid,JailCoord[rand][0], JailCoord[rand][1], JailCoord[rand][2]);
        
SetPlayerFacingAngle(playerid,JailCoord[rand][3]);
        
SetPlayerInterior(playerid,3);
        
SetPlayerVirtualWorld(playerid,0); 
Reply
#8

Thank you
Reply
#9

Quote:
Originally Posted by XaibBaba
Посмотреть сообщение
may it can help you
Код:
CMD:jail(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 1)
	{
		new
			iTargetID,
			szReason[64];

		if(sscanf(params, "us[64]", iTargetID, szReason)) {
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /jail [playerid/partofname] [reason]");
		}
		else if(IsPlayerConnected(iTargetID)) {
			if(AdminDuty[iTargetID] == 1) {
				return SendClientMessage(playerid, COLOR_WHITE, "You can't perform this action on on-duty admins.");
			}
			if(PlayerInfo[iTargetID][pAdmin] >= PlayerInfo[playerid][pAdmin]) {
				return SendClientMessage(playerid, COLOR_WHITE, "You can't perform this action on equal or higher admins.");
			}

			//if(GetPVarInt(iTargetID, "PBM") > 0) LeavePaintballArena(iTargetID, GetPVarInt(iTargetID, "IsInArena"));

			new
				szMessage[128];

			ResetPlayerWeaponsEx(iTargetID);
            if(PlayerDraggedBy[iTargetID] != INVALID_PLAYER_ID) {
				IsCopDragging[PlayerDraggedBy[iTargetID]] = INVALID_PLAYER_ID;
				PlayerDragged[iTargetID] = 0;
				PlayerDraggedBy[iTargetID] = INVALID_PLAYER_ID;
			}
			if(IsPlayerAttachedObjectSlotUsed(iTargetID, 0))
				RemovePlayerAttachedObject(iTargetID, 0);
			PlayerInfo[iTargetID][pJailed] = 3;
			PhoneOnline[iTargetID] = 1;
			PlayerInfo[iTargetID][pJailTime] = 10*60;

		    TogglePlayerControllable(iTargetID, 0);
			for(new o = 0; o < 6; o++)
			{
				TextDrawShowForPlayer(iTargetID, ObjectsLoadingTD[o]);
			}
			SetPVarInt(iTargetID, "LoadingObjects", 1);
   			SetTimerEx("SafeLoadObjects", 3000, 0, "d", iTargetID);

			SetPlayerInterior(iTargetID, 69);
			PlayerInfo[iTargetID][pVW] = 696969;
			PlayerInfo[iTargetID][pInt] = 69;
			SetPlayerVirtualWorld(iTargetID, 696969);
			new rand = random(sizeof(AdminPrisonFloat));
			SetPlayerPos(iTargetID, AdminPrisonFloat[rand][0], AdminPrisonFloat[rand][1], AdminPrisonFloat[rand][2]);

			format(szMessage, sizeof(szMessage), "AdmCmd: %s has been jailed by %s, reason: %s", GetPlayerNameEx(iTargetID), GetPlayerNameEx(playerid), szReason);
			SendClientMessageToAllEx(COLOR_LIGHTRED, szMessage);

			format(szMessage, sizeof(szMessage), "AdmCmd: %s has been jailed by %s, reason: %s", GetPlayerNameEx(iTargetID), GetPlayerNameEx(playerid), szReason);
			Log("logs/admin.log", szMessage);

			format(szMessage, sizeof(szMessage), "You have been jailed by Admin %s for 20 minutes, reason: %s.", GetPlayerNameEx(playerid), szReason);
			SendClientMessage(iTargetID, COLOR_LIGHTBLUE, szMessage);

			format(szMessage, sizeof(szMessage), "%s", szReason);
			SendClientMessage(iTargetID, COLOR_LIGHTBLUE, szMessage);

			strcpy(PlayerInfo[iTargetID][pPrisonedBy], GetPlayerNameEx(playerid), MAX_PLAYER_NAME);
			strcpy(PlayerInfo[iTargetID][pPrisonReason], szReason, 128);
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
		}
	}
	return 1;
}
He is asking for a jail position, not a script.

So, here you go buddy :

Position : 215.5644,110.7332,999.0156

Interior ID : 10


Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)