SA-MP Forums Archive
Username doesn't insert in samp - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Username doesn't insert in samp (/showthread.php?tid=662557)



Username doesn't insert in samp - xAndreiFTW - 05.01.2019

I made a cmd with Sanny Builder and I need to insert a username based on the player's id. I have done this:
Код:
 :cmd_52
SAMP.IsCommandTyped(20@)
if
0AD4: 20@ = scan_string 20@ format "%d" 21@
then
    0B36: samp 1@ = get_player_nickname 21@
    chatmsg "{ff9900}NR %s: Dacг ai un stil de viatг dificil, foloseste comanda [/jobs] pentru a-ti cвstiga pвinea." 1@
    chatmsg "{ff9900}NR %s: Vrei sг-ti plimbi prietena cu barca, оnsг nu ai licenta de navigatie? Foloseste comanda [/needlicense]." 1@
    chatmsg "{ff9900}NR %s: Helperii nostri sunt mereu pregгtiti sг vг sarг оn ajutor! Folositi de оndatг comanda [/n]." 1@
    chatmsg "{ff9900}NR %s: Agentia de asasini asigurг rapid moartea silentioasг dusmanilor folosind comanda [/contract]." 1@
    chatmsg "{ff9900}NR %s: Masina ta este defectг, iar investitiile sunt enorme? Du-te la DealerShip si cumpгrг-ti o masinг nouг." 1@
    chatmsg "{ff9900}NR %s: Plasarea de Anunturi e costisitoare? Atunci, asteapta ora fixг si plaseazг-l gratuit unui reporter." 1@
    chatmsg "{ff9900}NR %s: Comanda [/testers] stг la dispozitia candidatilor ce doresc sг se alгture unei factiuni." 1@
    chatmsg "{ff9900}NR %s: Iubita ta оti face reprosuri cum cг nu-i ajunge ce-i oferi? Atunci mergi la Sex Shop si cumpгrг-i un cadou." 1@
    chatmsg "{ff9900}NR %s: Ai fost acceptat оntr-o factiune? Оnvatг Regulamentul Intern оnainte de a sustine Testul de Intrare." 1@
    chatmsg "{ff9900}NR %s: Ai fost AFK si telefonul a sunat continuu? Foloseste comanda [/missed calls] si scapг de griji." 1@
    chatmsg "{ff9900}NR %s: Telefonul sunг din cauza mesajelor primite in masг, dar ai fost AFK? Foloseste comanda [/missed messages]." 1@
    chatmsg "{ff9900}NR %s: Vrei sг scapi din оnchisoare? Cautг un partener si foloseste comanda [/escape], apoi spargeti un gard." 1@
    chatmsg "{ff9900}NR %s: Crezi cг fontul din chat оti oboseste ochii? Ei bine, оl poti mгri sau miscora cu comanda [/fontsize]." 1@
    chatmsg "{ff9900}NR %s: Nu poti face fatг spamului facut de fani? Asta se poate aranja cu ajutorul comenzii [/pagesize]." 1@
    chatmsg "{ff9900}NR %s: Ti-ai dorit оntotdeauna un Rolex? Dг [/rob] cu un grup pentru o sumг considerabilг si scapг de politie." 1@
    
else
    chatmsg "{B8DBFF}Sintaxa: /testai + <id>" 2000
end
SAMP.CmdRet()
But in-game it looks like that, instead of displaying the name of the player(the null part): https://imgur.com/a/LRYGSiC
Please help me!
PS: I am a beginner :P

EDIT: I have found something on the internet but it displays only the ID:
Код:
 :cmd_52
SAMP.IsCommandTyped(20@)
if
0AD4:  $nul  = scan_string 20@ format "%s" 21@v
then
    0AF8: chatmsg "{ff9900}NR %s: Dacг ai un stil de viatг dificil, foloseste comanda [/jobs] pentru a-ti cвstiga pвinea." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Vrei sг-ti plimbi prietena cu barca, оnsг nu ai licenta de navigatie? Foloseste comanda [/needlicense]." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Helperii nostri sunt mereu pregгtiti sг vг sarг оn ajutor! Folositi de оndatг comanda [/n]." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Agentia de asasini asigurг rapid moartea silentioasг dusmanilor folosind comanda [/contract]." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Masina ta este defectг, iar investitiile sunt enorme? Du-te la DealerShip si cumpгrг-ti o masinг nouг." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Plasarea de Anunturi e costisitoare? Atunci, asteapta ora fixг si plaseazг-l gratuit unui reporter." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Comanda [/testers] stг la dispozitia candidatilor ce doresc sг se alгture unei factiuni." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Iubita ta оti face reprosuri cum cг nu-i ajunge ce-i oferi? Atunci mergi la Sex Shop si cumpгrг-i un cadou." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Ai fost acceptat оntr-o factiune? Оnvatг Regulamentul Intern оnainte de a sustine Testul de Intrare." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Ai fost AFK si telefonul a sunat continuu? Foloseste comanda [/missed calls] si scapг de griji." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Telefonul sunг din cauza mesajelor primite in masг, dar ai fost AFK? Foloseste comanda [/missed messages]." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Vrei sг scapi din оnchisoare? Cautг un partener si foloseste comanda [/escape], apoi spargeti un gard." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Crezi cг fontul din chat оti oboseste ochii? Ei bine, оl poti mгri sau miscora cu comanda [/fontsize]." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Nu poti face fatг spamului facut de fani? Asta se poate aranja cu ajutorul comenzii [/pagesize]." -1 20@
    0AF8: chatmsg "{ff9900}NR %s: Ti-ai dorit оntotdeauna un Rolex? Dг [/rob] cu un grup pentru o sumг considerabilг si scapг de politie." -1 20@
    
else
    chatmsg "{B8DBFF}Sintaxa: /testai + <id>" 2000
end
SAMP.CmdRet()



Re: Username doesn't insert in samp - xAndreiFTW - 05.01.2019

Quote:
Originally Posted by ******
Посмотреть сообщение
That is not pawn.
And what does that mean?


Re: Username doesn't insert in samp - Banditul18 - 05.01.2019

Quote:
Originally Posted by xAndreiFTW
Посмотреть сообщение
And what does that mean?
You will not get support here. This forum is for PAWN scripting, if you want cleo support go find other forum that is doing cleo stuff


Re: Username doesn't insert in samp - xAndreiFTW - 06.01.2019

Quote:
Originally Posted by Banditul18
Посмотреть сообщение
You will not get support here. This forum is for PAWN scripting, if you want cleo support go find other forum that is doing cleo stuff
Ok, thanks