SA-MP Forums Archive
Login/Logout Icons HELP! (Simple) - 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: Login/Logout Icons HELP! (Simple) (/showthread.php?tid=394914)



Login/Logout Icons HELP! (Simple) - zero4000 - 24.11.2012

Hello I have been ****** searching for the past 45 minutes now. I can find nothing about Login and Logout icons. I find how to add the death icons (Which I have already did) But I want the Login and Logout ones as well! I can't even find a picture to post here for you all but your smart so youll know what im talking about.

It is just like the icons when a player dies or is killed it will display who killed them then a little gun icon of fall icon or explosion icon ect ect. Then the player who died and its off on the right hand side of the server. I want icons to appear there when a player logs in as well as when they log out. I know its possible I have seen it done. Please help and +Rep to all who help.

EDIT YOYO posted this to me:

public OnPlayerConnect(playerid)
{
SendDeathMessage(-1, playerid, 200);
}
public OnPlayerDisconnect(playerid, reason)
{
SendDeathMessage(-1, playerid, 201);
}

He knows what he is doing but are you sure im supposed to send a deathmessage? Its for loging in and out?


Re: Login/Logout Icons HELP! (Simple) - YoYo123 - 24.11.2012

Yes, you need SendDeathMessage. Take a look at weapon ID 200 and 201: https://sampwiki.blast.hk/wiki/Weapons
All those icons are supposed to be used with SendDeathMessage, nothing else.


Re: Login/Logout Icons HELP! (Simple) - zero4000 - 24.11.2012

Ok thank you for your help Rep+ how much scripting do you know as I have one other problem I am currently working on and it would be easier to ask you directly rather then open a new topic.


Re: Login/Logout Icons HELP! (Simple) - Glad2BeHere - 24.11.2012

for it to appear on the right hand then u need to put under onplayerdeath


Re: Login/Logout Icons HELP! (Simple) - Kerlan - 24.11.2012

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
for it to appear on the right hand send u need to put under onplayerdeath

yeah


Re: Login/Logout Icons HELP! (Simple) - zero4000 - 24.11.2012

That makes no sence at all. Why would the function be put in a call back that is only called when a player die. This is for login in and out, it need to be in a callback the calls on players logging in and out :/ Sorry but I have already added this to my server and it works just fine.