playerConnect

From IV:MP Wiki

Jump to: navigation, search

This event is called when the player is connecting so you can have name checks before the player fully joins the server.
Please do not use native functions on the player, use the playerJoin event instead for connect messages and setting spawn info.

This event is triggered when a player connects.

Contents

[hide]

Parameters

Example

1
2
3
4
5
6
function onPlayerConnect( playerid, name, ip, serial, hasModdedGameFile )
{
    if(hasModdedGameFile) return 0; //abort connection so it kicks the player for having a modded base game.
    return 1;
}
addEvent("playerConnect", onPlayerConnect);

Return

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Server
Client
Scripting
Toolbox