VC:MP 0.3 > Snippet Showroom

Simple name detect

(1/2) > >>

The_Lucifer:
Hello all!, today I made a simple name detect system ( Detects custom names ), here it is:

OnPlayerConnect:

[pawn]new name[MAX_PLAYER_NAME];[/pawn]

[pawn]GetPlayerName( playerid, name, sizeof(name))[/pawn]

[pawn]if (!strcmp(name,"-NAME-",true))
    {
    SendClientMessage(playerid, BLUE, "Hi!, your a special member!");
    }[/pawn]

For example, i have this:

[pawn]if (!strcmp(LuciferName,"NE.CrystalBlue",true))
    {
    SendClientMessage(playerid, BLUE, " ");
    SendClientMessage(playerid, BLUE, " ");
    SendClientMessage(playerid, BLUE, " ");
    SendClientMessage(playerid, BLUE, " ");
    SendClientMessageToAll(RED, "NE.CrystalBlue has Connected as a Special-Player!");
    SendClientMessage(playerid, BLUE, "Hello! NE.CrystalBlue, your a Special player for this server.");
    SendClientMessage(playerid, BLUE, "To loggin use /c conectar [ Password ]");
    }[/pawn]

Hope u liked it, any bugs? tell me

NeskWriter:
Personally I don't find it useful, and I'd like to note that it's definitely made by Res


--- Quote from: The_Lucifer ---today I made a simple name detect system
--- End quote ---
probably today you have been given a reply message in which Res sent you the code

The_Lucifer:
Dude, of course someone else in this world has made it too, but i scripted it and im just sharing it.

NeskWriter:

--- Quote from: The_Lucifer on September 01, 2014, 08:55:28 pm ---Dude, of course someone else in this world has made it too, but i scripted it and im just sharing it.

--- End quote ---

Even if you'd do so, Why would your code have Res' name?

The_Lucifer:
Who is Res?! is Res NE.restricted? i have his name there becuase he is a special person, he took off all the warning of my server, thats why ._.

Navigation

[0] Message Index

[#] Next page

Go to full version