Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: pm/pw
1. PM/PW przez id, jak?
Cze??, mam taki kodzik na wiadomo?ci prywatne, wszystko super dzia?a, jednak chcia?bym, aby by?a mo?liwo?? wys?ania pw przez ID, mam skrypt na id on te? dzia?a, prosz? o pomoc.

Kod pm:

[lua]function privateMessage(thePlayer,commandName,sendToName,...)
local pmWords = { ... }
local pmMessage = table.concat( pmWords, " " )
if sendToName then
if (getPlayerFromParticalName (sendToName)) then
toPlayer = (getPlayerFromParticalName (sendToName))
if not (toPlayer == thePlayer) then
if not (pmMessage == "") then
outputChatBox(">> " .. getPlayerName(toPlayer) .. ": " .. pmMessage, thePlayer, true)
outputChatBox("<< " .. getPlayerName(thePlayer) .. ": " .. pmMessage, toPlayer, true)
else
outputChatBox("* U?yj /pm <ID/nick> <tre??>.", thePlayer, true)
return false
end
else
outputChatBox("* Nie mo?esz wys?a? wiadomo?ci do siebie.", thePlayer, true)
return false
end
else
outputChatBox("* Nie odnaleziono gracza o podanym ID/nicku.", thePlayer, true)
return false
end
else
outputChatBox("* U?yj /pm <ID/nick> <tre??>.", thePlayer, true)
return false
end
end
addCommandHandler("pm", privateMessage)
addCommandHandler("pw", privateMessage)

function getPlayerFromParticalName(thePlayerName)
local thePlayer = getPlayerFromName(thePlayerNa...