springfield said:
Uhh, what?
If you already have his name you wouldn't need to call 0B36, right?
Since 0B36 takes a int as parameter, that needs to be the player id not name.
@v strings can only hold 16 chars, what if a player name has more, like 18 or 20 or 24?
Yeah I know he could just do it with ID but i thought it would be more cool to insert any name :3
Also SAMP has a char limit so it's not a problem
Sorry I was in a hurry, 0B36 should not be called as spring said
So if you want to insert any nickname that you want, that's the solution
Code:
:cmd_118
SAMP.IsCommandTyped(20@)
if
0AD4: 20@ = scan_string 20@ format "%s" 21@v
then
0AF8: chatmsg "{CECECE}%s:{FFFFFF} loves you." -1 21@v
else
print "~r~/love<id>" 2000
end
SAMP.CmdRet()
If you want with ID, here it is
didn't test it tho
Code:
:cmd_118
SAMP.IsCommandTyped(20@)
if
0AD4: 20@ = scan_string 20@ format "%d" 21@v
then
22@ = SAMP.GetActorHandleByPlayerID(21@)
0B36: samp 1@v = get_player_nickname 22@v
0AF8: chatmsg "{CECECE}%s:{FFFFFF} loves you." -1 1@v
else
print "~r~/love<id>" 2000
end
SAMP.CmdRet()