Jump to content

Recommended Posts

Posted

Sal, as vrea sa fac si eu o comanda de sms id call id /reply fara iphone, dar nu prea stiu de unde sa incep.

Iar ca sidequest as vrea sa inteleg cum pot sa rezolv o problema legata de:

 

:cmd_cuid1
SAMP.IsCommandTyped(20@)
if
0AD4: 20@ = scan_string 20@ format "%d" 21@
then
    0B36: samp 1@ = get_player_nickname 21@
    0AF9: samp say_msg "/number %s" 1@
    else
    chatmsg "/nr <id>" 
    
end
SAMP.CmdRet()

 

nu inteleg de ce la inceput cand intru pe server imi apare /nr <id>, cand ar trebui sa apara doar cand dau /nr fara id. Mersi de info

Posted (edited)

nu inteleg ce e aici.

e cod specific librariei cleo ? 

si ce inseamna "comanda de sms id call id /reply fara iphone" ? 🤨

am facut si eu ceva repede sa vad daca mai tin minte vreo sintagma, nu stiu cat sens are dar teoretic ar trebui sa fie macar corect, nu si functional in cazul tau. 😆

 

CMD:sms(playerid, params[])
{
    new targetid, message[128];
    if (sscanf(params, "us[128]", targetid, message)) return SendClientMessage(playerid, -1, "Utilizare: /sms [ID] [Mesaj]");
    if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "Jucatorul specificat nu este conectat.");
    new senderName[MAX_PLAYER_NAME], smsMessage[144];
    GetPlayerName(playerid, senderName, sizeof(senderName));
    format(smsMessage, sizeof(smsMessage), "[SMS de la %s]: %s", senderName, message);
    SendClientMessage(targetid, -1, smsMessage);
    SendClientMessage(playerid, -1, "[SMS trimis]");

    lastSender[targetid] = playerid;
    return 1;
}

CMD:reply(playerid, params[])
{
    new replyMessage[128], targetid = lastSender[playerid];
    if (sscanf(params, "s[128]", replyMessage)) return SendClientMessage(playerid, -1, "Utilizare: /reply [Mesaj]");
    if (targetid == INVALID_PLAYER_ID || !IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "Nu ai niciun mesaj la care sa raspunzi.");
    new senderName[MAX_PLAYER_NAME], smsMessage[144];
    GetPlayerName(playerid, senderName, sizeof(senderName));
    format(smsMessage, sizeof(smsMessage), "[Raspuns SMS de la %s]: %s", senderName, replyMessage);
    SendClientMessage(targetid, -1, smsMessage);
    SendClientMessage(playerid, -1, "[Rsspuns SMS trimis]");
    lastSender[targetid] = playerid;
    return 1;
}

 

Edited by R X S
  • 1 month later...
Posted
On 8/15/2024 at 5:39 AM, R X S said:

nu inteleg ce e aici.

e cod specific librariei cleo ? 

si ce inseamna "comanda de sms id call id /reply fara iphone" ? 🤨

am facut si eu ceva repede sa vad daca mai tin minte vreo sintagma, nu stiu cat sens are dar teoretic ar trebui sa fie macar corect, nu si functional in cazul tau. 😆

 

CMD:sms(playerid, params[])
{
    new targetid, message[128];
    if (sscanf(params, "us[128]", targetid, message)) return SendClientMessage(playerid, -1, "Utilizare: /sms [ID] [Mesaj]");
    if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "Jucatorul specificat nu este conectat.");
    new senderName[MAX_PLAYER_NAME], smsMessage[144];
    GetPlayerName(playerid, senderName, sizeof(senderName));
    format(smsMessage, sizeof(smsMessage), "[SMS de la %s]: %s", senderName, message);
    SendClientMessage(targetid, -1, smsMessage);
    SendClientMessage(playerid, -1, "[SMS trimis]");

    lastSender[targetid] = playerid;
    return 1;
}

CMD:reply(playerid, params[])
{
    new replyMessage[128], targetid = lastSender[playerid];
    if (sscanf(params, "s[128]", replyMessage)) return SendClientMessage(playerid, -1, "Utilizare: /reply [Mesaj]");
    if (targetid == INVALID_PLAYER_ID || !IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "Nu ai niciun mesaj la care sa raspunzi.");
    new senderName[MAX_PLAYER_NAME], smsMessage[144];
    GetPlayerName(playerid, senderName, sizeof(senderName));
    format(smsMessage, sizeof(smsMessage), "[Raspuns SMS de la %s]: %s", senderName, replyMessage);
    SendClientMessage(targetid, -1, smsMessage);
    SendClientMessage(playerid, -1, "[Rsspuns SMS trimis]");
    lastSender[targetid] = playerid;
    return 1;
}

 

E vorba de un cleo script bro

 

Nu stiu daca te poate ajuta cineva

maxresdefault.jpg

 

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.