![]() |
|
OnInvionAskForHelp;... - Printable Version +- Las Venturas Playground (https://forum.sa-mp.nl) +-- Forum: Miscellaneous (https://forum.sa-mp.nl/forum-4.html) +--- Forum: Gaming (https://forum.sa-mp.nl/forum-27.html) +--- Thread: OnInvionAskForHelp;... (/thread-8254.html) |
OnInvionAskForHelp;... - Danny - 04-23-2008 I need help with my OnPlayerConnect! Atm, when someone connects connects, it doesnt say anything! You only know that someone has connected when you look in tab! Here is my code Code: public OnPlayerConnect(playerid)How can I make it so that it says: (Player Name) has connected to the server Thanks -InVion_ Re: OnInvionAskForHelp;... - Smoke - 04-23-2008 add this to onplayerconnect Code: new string[47];hope i helped
Re: OnInvionAskForHelp;... - AzTeC - 04-23-2008 Code: public OnPlayerConnect(playerid)this should work Re: OnInvionAskForHelp;... - MoToRoLa - 04-23-2008 Quote:new pName[MAX_PLAYER_NAME]; ya it may work, but its more easy this isnt it?: Code: public OnPlayerConnect(playerid){you can replace this: Code: SendClientMessageToAll(0xAAAAAAAA, string);Code: SendClientMessageToAll(COLOR_RED, string);Code: #define COLOR_GREY 0xAFAFAFAARe: OnInvionAskForHelp;... - Smoke - 04-24-2008 Quote: format(string, sizeof(string), "%s(ID:%d) has joined the server.", pName,playerid); okay, but if you add that then you have to change the string size from 47 to 52 so here: public OnPlayerConnect(playerid){ new pName[24]; new string[52]; GetPlayerName(playerid, pName, 24 format(string, sizeof(string), "%s(ID:%d) has joined the server.", pName,playerid); SendClientMessageToAll(0xAAAAAAAA, string); return 1; } and the pName variable is max_size is 24 not 30 and when using the max number you have to change sizeof(pName) to 24 also i added COLOR_GREEN in there because i already new that he defined it because in the first post he uses it in the message "type /help for help" |