[Help] Windows to Linux
#1

Can somebody explain to me or do windows to Linux... So i need to put this code to Linux please help (this is jobs, garbage man, and table clener)

Код:
COMMAND:kupismece(playerid, params[])
{
    if(PlayerStat[playerid][Dead] == 1 || PlayerStat[playerid][InHospital] == 1) return SendClientMessage(playerid, GREY, "You are unconscious.");
	if(PlayerStat[playerid][JobID] != 1) return SendClientMessage(playerid, GREY, "You are not a Garbage Man.");
	if(PlayerStat[playerid][CollectingGarbage] == 1) return SendClientMessage(playerid, GREY, "You already picked a garbage bag.");
	if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) return SendClientMessage(playerid, GREY, "You can't use this command while holding something else.");

	new Float: Bag1X, Float: Bag1Y, Float: Bag1Z;
	new Float: Bag2X, Float: Bag2Y, Float: Bag2Z;
	new Float: Bag3X, Float: Bag3Y, Float: Bag3Z;
	new Float: Bag4X, Float: Bag4Y, Float: Bag4Z;
	new Float: Bag5X, Float: Bag5Y, Float: Bag5Z;
	new Float: Bag6X, Float: Bag6Y, Float: Bag6Z;
	new Float: Bag7X, Float: Bag7Y, Float: Bag7Z;
	new Float: Bag8X, Float: Bag8Y, Float: Bag8Z;
	new Float: Bag9X, Float: Bag9Y, Float: Bag9Z;

	GetDynamicObjectPos(Bag1, Bag1X, Bag1Y, Bag1Z);
	GetDynamicObjectPos(Bag2, Bag2X, Bag2Y, Bag2Z);
	GetDynamicObjectPos(Bag3, Bag3X, Bag3Y, Bag3Z);
	GetDynamicObjectPos(Bag4, Bag4X, Bag4Y, Bag4Z);
	GetDynamicObjectPos(Bag5, Bag5X, Bag5Y, Bag5Z);
	GetDynamicObjectPos(Bag6, Bag6X, Bag6Y, Bag6Z);
	GetDynamicObjectPos(Bag7, Bag7X, Bag7Y, Bag7Z);
	GetDynamicObjectPos(Bag8, Bag8X, Bag8Y, Bag8Z);
	GetDynamicObjectPos(Bag9, Bag9X, Bag9Y, Bag9Z);

	if(PlayerStat[playerid][AbleToCollectGarbage] == 1)
	{
		if(IsPlayerInRangeOfPoint(playerid, 1.0, Bag1X, Bag1Y, Bag1Z) && GarbageBag1Used == 0)
		{
			new str[128];
		    TogglePlayerDynamicCP(playerid, GarbageCheckpoint, 1);
		    PlayerStat[playerid][CollectingGarbage] = 1;
		    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0,0,0,0,0,0);
		    PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
            SetPlayerAttachedObject(playerid, INDEX_GARBAGE, 1264, 5, 0.259646, -0.083203, -0.004445, 51.872596, 290.377227, 328.842437, 1.000000, 1.000000, 1.000000);
			DestroyDynamicObject(Bag1);
			GarbageBag1Used = 1;
			format(str, sizeof(str), "* %s uzima smece sa poda, i stavlja ga u lijevu ruku.", GetICName(playerid));
            SendNearByMessage(playerid, ACTION_COLOR, str, 5);
            SendClientMessage(playerid, GOLD, "Idite do crvenog markera.");
            PlayerStat[playerid][AbleToCollectGarbage] = 1;
            PlayerStat[playerid][JobID1ReloadTime] = 60;
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1.0, Bag2X, Bag2Y, Bag2Z) && GarbageBag2Used == 0)
		{
			new str[128];
		    TogglePlayerDynamicCP(playerid, GarbageCheckpoint, 1);
		    PlayerStat[playerid][CollectingGarbage] = 1;
		    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0,0,0,0,0,0);
		    PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
			SetPlayerAttachedObject(playerid, INDEX_GARBAGE, 1264, 5, 0.259646, -0.083203, -0.004445, 51.872596, 290.377227, 328.842437, 1.000000, 1.000000, 1.000000);
			DestroyDynamicObject(Bag2);
			GarbageBag2Used = 1;
			format(str, sizeof(str), "* %s uzima smece sa poda, i stavlja ga u lijevu ruku.", GetICName(playerid));
            SendNearByMessage(playerid, ACTION_COLOR, str, 5);
            SendClientMessage(playerid, GOLD, "Idite do crvenog markera.");
            PlayerStat[playerid][AbleToCollectGarbage] = 1;
            PlayerStat[playerid][JobID1ReloadTime] = 60;
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1.0, Bag3X, Bag3Y, Bag3Z) && GarbageBag3Used == 0)
		{
			new str[128];
		    TogglePlayerDynamicCP(playerid, GarbageCheckpoint, 1);
		    PlayerStat[playerid][CollectingGarbage] = 1;
		    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0,0,0,0,0,0);
		    PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
			SetPlayerAttachedObject(playerid, INDEX_GARBAGE, 1264, 5, 0.259646, -0.083203, -0.004445, 51.872596, 290.377227, 328.842437, 1.000000, 1.000000, 1.000000);
			DestroyDynamicObject(Bag3);
			GarbageBag3Used = 1;
			format(str, sizeof(str), "* %s uzima smece sa poda, i stavlja ga u lijevu ruku.", GetICName(playerid));
            SendNearByMessage(playerid, ACTION_COLOR, str, 5);
            SendClientMessage(playerid, GOLD, "Idite do crvenog markera.");
            PlayerStat[playerid][AbleToCollectGarbage] = 1;
            PlayerStat[playerid][JobID1ReloadTime] = 60;
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1.0, Bag4X, Bag4Y, Bag4Z) && GarbageBag4Used == 0)
		{
			new str[128];
		    TogglePlayerDynamicCP(playerid, GarbageCheckpoint, 1);
		    PlayerStat[playerid][CollectingGarbage] = 1;
		    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0,0,0,0,0,0);
		    PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
			SetPlayerAttachedObject(playerid, INDEX_GARBAGE, 1264, 5, 0.259646, -0.083203, -0.004445, 51.872596, 290.377227, 328.842437, 1.000000, 1.000000, 1.000000);
			DestroyDynamicObject(Bag4);
			GarbageBag4Used = 1;
			format(str, sizeof(str), "* %s uzima smece sa poda, i stavlja ga u lijevu ruku.", GetICName(playerid));
            SendNearByMessage(playerid, ACTION_COLOR, str, 5);
            SendClientMessage(playerid, GOLD, "Idite do crvenog markera.");
            PlayerStat[playerid][AbleToCollectGarbage] = 1;
            PlayerStat[playerid][JobID1ReloadTime] = 60;
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1.0, Bag5X, Bag5Y, Bag5Z) && GarbageBag5Used == 0)
		{
			new str[128];
		    TogglePlayerDynamicCP(playerid, GarbageCheckpoint, 1);
		    PlayerStat[playerid][CollectingGarbage] = 1;
		    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0,0,0,0,0,0);
		    PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
			SetPlayerAttachedObject(playerid, INDEX_GARBAGE, 1264, 5, 0.259646, -0.083203, -0.004445, 51.872596, 290.377227, 328.842437, 1.000000, 1.000000, 1.000000);
			DestroyDynamicObject(Bag5);
			GarbageBag5Used = 1;
			format(str, sizeof(str), "* %s uzima smece sa poda, i stavlja ga u lijevu ruku.", GetICName(playerid));
            SendNearByMessage(playerid, ACTION_COLOR, str, 5);
            SendClientMessage(playerid, GOLD, "Idite do crvenog markera.");
            PlayerStat[playerid][AbleToCollectGarbage] = 1;
            PlayerStat[playerid][JobID1ReloadTime] = 60;
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1.0, Bag6X, Bag6Y, Bag6Z) && GarbageBag6Used == 0)
		{
			new str[128];
		    TogglePlayerDynamicCP(playerid, GarbageCheckpoint, 1);
		    PlayerStat[playerid][CollectingGarbage] = 1;
		    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0,0,0,0,0,0);
		    PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
			SetPlayerAttachedObject(playerid, INDEX_GARBAGE, 1264, 5, 0.259646, -0.083203, -0.004445, 51.872596, 290.377227, 328.842437, 1.000000, 1.000000, 1.000000);
			DestroyDynamicObject(Bag6);
			GarbageBag6Used = 1;
			format(str, sizeof(str), "* %s uzima smece sa poda, i stavlja ga u lijevu ruku.", GetICName(playerid));
            SendNearByMessage(playerid, ACTION_COLOR, str, 5);
            SendClientMessage(playerid, GOLD, "Idite do crvenog markera.");
            PlayerStat[playerid][AbleToCollectGarbage] = 1;
            PlayerStat[playerid][JobID1ReloadTime] = 60;
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1.0, Bag7X, Bag7Y, Bag7Z) && GarbageBag7Used == 0)
		{
			new str[128];
		    TogglePlayerDynamicCP(playerid, GarbageCheckpoint, 1);
		    PlayerStat[playerid][CollectingGarbage] = 1;
		    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0,0,0,0,0,0);
		    PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
			SetPlayerAttachedObject(playerid, INDEX_GARBAGE, 1264, 5, 0.259646, -0.083203, -0.004445, 51.872596, 290.377227, 328.842437, 1.000000, 1.000000, 1.000000);
			DestroyDynamicObject(Bag7);
			GarbageBag7Used = 1;
			format(str, sizeof(str), "* %s uzima smece sa poda, i stavlja ga u lijevu ruku.", GetICName(playerid));
            SendNearByMessage(playerid, ACTION_COLOR, str, 5);
            SendClientMessage(playerid, GOLD, "Idite do crvenog markera.");
            PlayerStat[playerid][AbleToCollectGarbage] = 1;
            PlayerStat[playerid][JobID1ReloadTime] = 60;
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1.0, Bag8X, Bag8Y, Bag8Z) && GarbageBag8Used == 0)
		{
			new str[128];
		    TogglePlayerDynamicCP(playerid, GarbageCheckpoint, 1);
		    PlayerStat[playerid][CollectingGarbage] = 1;
		    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0,0,0,0,0,0);
		    PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
			SetPlayerAttachedObject(playerid, INDEX_GARBAGE, 1264, 5, 0.259646, -0.083203, -0.004445, 51.872596, 290.377227, 328.842437, 1.000000, 1.000000, 1.000000);
			DestroyDynamicObject(Bag8);
			GarbageBag8Used = 1;
			format(str, sizeof(str), "* %s uzima smece sa poda, i stavlja ga u lijevu ruku.", GetICName(playerid));
            SendNearByMessage(playerid, ACTION_COLOR, str, 5);
            SendClientMessage(playerid, GOLD, "Idite do crvenog markera.");
            PlayerStat[playerid][AbleToCollectGarbage] = 1;
            PlayerStat[playerid][JobID1ReloadTime] = 60;
		}
		else if(IsPlayerInRangeOfPoint(playerid, 1.0, Bag9X, Bag9Y, Bag9Z) && GarbageBag9Used == 0)
		{
			new str[128];
		    TogglePlayerDynamicCP(playerid, GarbageCheckpoint, 1);
		    PlayerStat[playerid][CollectingGarbage] = 1;
		    ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0,0,0,0,0,0);
		    PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
			SetPlayerAttachedObject(playerid, INDEX_GARBAGE, 1264, 5, 0.259646, -0.083203, -0.004445, 51.872596, 290.377227, 328.842437, 1.000000, 1.000000, 1.000000);
			DestroyDynamicObject(Bag9);
			GarbageBag9Used = 1;
			format(str, sizeof(str), "* %s uzima smece sa poda, i stavlja ga u lijevu ruku.", GetICName(playerid));
            SendNearByMessage(playerid, ACTION_COLOR, str, 5);
            SendClientMessage(playerid, GOLD, "Idite do crvenog markera.");
            PlayerStat[playerid][AbleToCollectGarbage] = 1;
            PlayerStat[playerid][JobID1ReloadTime] = 60;
		}
		else return SendClientMessage(playerid, GREY, "Niste blizu smeca.");
	}
	else return SendClientMessage(playerid, GREY, "Morate cekati 1 minutu, da biste mogli ponovo kupiti smece.");
    return 1;
}
A evo i od cistaca stolova

Код:
COMMAND:cististolove(playerid, params[])
{
    if(PlayerStat[playerid][Dead] == 1 || PlayerStat[playerid][InHospital] == 1) return SendClientMessage(playerid, GREY, "Vi niste pri svjesti.");
	if(PlayerStat[playerid][JobID] != 2) return SendClientMessage(playerid, GREY, "Vi niste cistac stolova.");
	if(PlayerStat[playerid][CleaningTables] == 1) return SendClientMessage(playerid, GREY, "Vi vec cistite.");
	if(PlayerStat[playerid][AbleToCleanTables] == 1)
	{
		TogglePlayerDynamicCP(playerid, TableCheckpoint1, 1);
		SendClientMessage(playerid, GOLD, "Prijedite sve markere da ocistite stolove.");
		PlayerStat[playerid][CleaningTables] = 1;
	}
	else return SendClientMessage(playerid, GREY, "Morate cekati 1 minutu da biste ponovno mogli cistiti.");
    return 1;
}
Reply
#2

You want us to convert this to linux? I don't understand. Pawn code is always the same, doesn't depend on the OS of the computer or anything. If you wish to change a windows server so that it can run on a linux server (if thats what you want) instead of using .dll plugins, use .so plugins for your server if you use any and download the server package for the current files that you need to run the server.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)