[setPlayerClothes] & [setPlayerProperty] Release With Limitied Variation IDs

Share your gamemodes and snippets here
Post Reply
beshoopaula
Posts: 8
Joined: January 24th, 2018, 3:42 am

[setPlayerClothes] & [setPlayerProperty] Release With Limitied Variation IDs

Post by beshoopaula » June 22nd, 2019, 3:38 pm

Code: Select all

if(string.sub(text, 1, 8) == "/uniform") then
	    sendPlayerMsg(playerid, "Usage /uniform [partID from 0 to 8] [partID from 0 to 99]", 0xFFFF0000)
	    local clothes1 = tonumber(string.sub(text, 10, 10))
		    if(clothes1 > 8) then
		    return
		    sendPlayerMsg(playerid, " " ..clothes1.. " = Wrong Part ID", 0xFFFF0000)
	        end
			local clothes2 = tonumber(string.sub(text, 12, 13))
		    if(clothes2 > 99) then
		    return
		    sendPlayerMsg(playerid, " " ..clothes2.. " = Wrong Part ID", 0xFFFF0000)
			end
	    setPlayerClothes(playerid, clothes1, clothes2)
	    sendPlayerMsg(playerid, "Your Uniform Changed To Part 1:-  " .. clothes1 .." , Part 2:-  " .. clothes2, 0xFFFFFFFF)
	        elseif(string.sub(text, 1, 8) == "/clothes") then
 	        sendPlayerMsg(playerid, "Usage /uniform 2 [partID from 0 to 1] [partID from 0 to 99]", 0xFFFF0000)
	        local clothes3 = tonumber(string.sub(text, 10, 10))
	        if(clothes3 > 1) then
		    return
		    sendPlayerMsg(playerid, " " ..clothes3.. " = Wrong Part ID", 0xFFFF0000)
		    end
	        local clothes4 = tonumber(string.sub(text, 12, 13))
	        if(clothes4 > 99) then
		    return
		    sendPlayerMsg(playerid, " " ..clothes4.. " = Wrong Part ID", 0xFFFF0000)
		    end
	setPlayerProperty(playerid, clothes3, clothes4)
	sendPlayerMsg(playerid, "Your Uniform Changed To Part 3:-  " .. clothes3 .." , Part 4:-  " .. clothes4, 0xFFFFFFFF)
	end	

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests