27.01.2018, 14:14
._. do a variable check that checks true onplayerspawn and false onplayerdisconnect? ex:
PHP код:
new bool:OneMessage[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(!OneMessage[playerid])//checking if it was never set before
{
SendClientMessage(playerid, -1, "Hi one message here");//sending the message
OneMessage[playerid] = true;//checking true to make it get called once
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
OneMessage[playerid] = false;// resetting it for the next player connecting with that id.
return 1;
}