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
1. Nie dziala komenda /pm /pw /w
Witam pisze tutaj poniewaz od ostatniego czasu nie dziala komenda /pm /pw oraz /w zadnych bledow w db3 nizej przesylam core jest z psrpg
s_commands.lua
[lua]
function RGBToHex(red, green, blue, alpha)
if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
return nil
end
if(alpha) then
return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha)
else
return string.format("#%.2X%.2X%.2X", red,green,blue)
end
end

local settings = {
['swearFilter'] = {
['enabled'] = true,
['swears'] = { -- Allows you to set the blocked swear words, syntax is ['WORD'] = 'REPLACEMENT'
['k****'] = '****',
['cwel'] = '****',
['k****?'] = '****',
['c w e l'] = '****',
['k u r w a'] = '****',
['cwelem'] = '******',
['c w e l e m'] = '****',
['k u r w ?'] = '****',
['szmata'] = '****',
['dziwka'] = '****',
['*****'] = '****',
['jajebie'] = '****',
['j***e'] = '****',
['*****'] = '****',
['*****'] = '****',
['k****'] = '****',
['frajer'] = '****',
['frajerze'] = '****',
['*****'] = '****',
['ja *****'] = '****',
['*****'] = '****',
['*****'] = '****',
['c***'] = '****',
['szmato'] = '****',
['dziwko'] = '****',
['peda?'] = '****',
['pedal'] = '****',
['peda?y'] = '****',
['frjerzy'] = '****',
['frajerka'] = '****',
['p****'] = '****',
['piz...
2. Nie działa komenda /pm
Cze?? mam napisany skrypt na komende /pm ale nie dzia?a wysy?anie wiadomo??i.

kod;

function PrywatnaWiadomosc(plrcmdtarget, ...)
    
local text=table.concat({...}, ' ')
    if 
not target or not {...} then
        outputChatBox
('#c0c0c0<> #FFFFFFAby wys?a? prywatn? wiadomo?? wpisz #FF0000/pm <gracz> <tresc>'plr255255255true)
        return
    
end
        
if not target then
        outputChatBox
("#c0c0c0<> #FFFFFFSystem nie odnalazl podanego przez #FF0000Ciebie #FFFFFFgracza."plr255255255true)
        return 
        
end
    
if not target then
        outputChatBox
("#c0c0c0<> #FFFFFFSystem nie odnalazl podanego przez #FF0000Ciebie #FFFFFFgracza."plr255255255true)
        return
    
end
    nick 
getPlayerName(plr)
    
cel findPlayer(plrtarget)
    if 
not cel then
        outputChatBox
("#c0c0c0<> #FFFFFFPodany przez #FF0000Ciebie #FFFFFFgracz, jest aktualnie #FF0000OFFLINE#FFFFFF!"plr255255255true)
        return
    
end    
    gracz 
getPlayerName(cel)
    
outputChatBox("#c0c0c0<> #FFFFFFOtrzymales PM od #FF0000"..gracz.." #FFFFFF: "..text.."",plr,255,255,255true)
    
outputChatBox("#c0c0c0<> #FFFFFFWyslales PM do gracza #FF0000"..nick..""cel,255,255,255true)
end
addCommandHandler
('pm'PrywatnaWiadomosc)
3. [INNE] Prywatna wiadomość /pm
Witam

Mam tak? komend?:
[code]if(strcmp(cmd, "/pm", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Bialy, "U?yj: /pm [playerid] [text]");
return 1;
}
giveplayerid = strval(tmp);
tmp = strrest(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Bialy, "U?yj: /pm [playerid] [text]");
return 1;
}
if (IsPlayerConnected(giveplayerid)) {
format(string, sizeof(string), "PM do %s(ID: %d).", PlayerName(giveplayerid),giveplayerid);
SendClientMessage(playerid, Zolty, string);
format(string, sizeof(string), "PM od: %s(ID: %d).", PlayerName(playerid), playerid);
SendClientMessage(giveplayerid, Zolty, string);
format(string, sizeof(string), "Tre??: %s", tmp);
SendClientMessage(giveplayerid, Zolty, string);
}else{
format(string, sizeof(string), "%d Nie ma takiego id!", giveplayerid);
SendClientMessage(playerid, Czerwony, string);
}
return 1;
}[/code]

i mam to przerobione na sms'a:
[code]if(strcmp(cmd, "/sms", true) == 0)
{
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_INPUT, "Prywatna wiadomo??", "Sms kosztuje 1$.nWpisz tre?? sms'a:", "Zatwierd?", "Anuluj");
return 1;
}[/code]

dalej mam:
[code]if(dialogid == 100)
{
if(response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 101, DIALOG_STYLE_INPUT, "Prywatna wiadomo??", "Wpisz id odbiorcy:", &q...