Help for Name
#1

Hello

i want help , +rep for help, i want make is can all name connect in Server , example :alex1 [Mp]alion , all name accept

when i delete this all code for name is crash pawno

this my code in my GM , and i want do can all name accept connect , what i do ?

pawn Код:
public OnPlayerConnect(playerid)
{
    // ONPLAYERCONNECT
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    if(strfind(playername, "_", true) != -1)
    {
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}NMRP: {FFFFFF}Your name needs to be Role-Play! (For example: John_Smith) With NO numbers!");
        return Kick(playerid);
    }
    if(strfind(playername, "0", true) != -1 || strfind(playername, "1", true) != -1 || strfind(playername, "2", true) != -1 || strfind(playername, "3", true) != -1 || strfind(playername, "4", true) != -1 || strfind(playername, "5", true) != -1
    || strfind(playername, "6", true) != -1 || strfind(playername, "7", true) != -1 || strfind(playername, "8", true) != -1 || strfind(playername, "9", true) != -1)
    {
        SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}NMRP: {FFFFFF}Your name needs to be Role-Play! (For example: John_Smith) With NO numbers!");
        return Kick(playerid);
    }
    PlayerSFC_Loaded[playerid] = 0;
    PlayerSFC[playerid] = 0;
    PlayerDead[playerid] = 0;
    PlayerDeadInt[playerid] = 0;
    PlayerDeadWorld[playerid] = 0;
    LoadedPatient[playerid] = INVALID_PLAYER_ID;
    Dim2D_Remove(PlayerReport, playerid);
    CheatTimer[playerid] = 5;
    for (new i = 0; i < 13; i ++)
    {
        PlayerWeapons[playerid][i] = 0;
        PlayerAmmo[playerid][i] = 0;
    }
    WarStats1[playerid] = 0;
    WarStats2[playerid] = 0;
    TogLC[playerid] = 1;
    TogAC[playerid] = 1;
    EnteredHouse[playerid] = 0;
    Hacked[playerid] = 0;
    PlayerInfo[playerid][pGPS] = 0;
    strmid(PlayerInfo[playerid][pSText], "NoText", 0, 255, 255);
    RentHouse[playerid] = 0;
    JobStep[playerid] = 0;
    PlayerInfo[playerid][pSQLID] = 0;
    AdTimer[playerid] = 0;
Reply
#2

You didn't close the bracket.
Add
}
At the bottom of the code. Although you maybe just not Copied+Pasted all of it. But from what I see that's what is causing it.
Reply
#3

Quote:
Originally Posted by Lynn
Посмотреть сообщение
You didn't close the bracket.
Add
}
At the bottom of the code. Although you maybe just not Copied+Pasted all of it. But from what I see that's what is causing it.
no i paste all , and me i want to delete this , i want did accept all name
Reply
#4

Bump
Reply
#5

pawn Код:
public OnPlayerConnect(playerid)
{
    PlayerSFC_Loaded[playerid] = 0;
    PlayerSFC[playerid] = 0;
    PlayerDead[playerid] = 0;
    PlayerDeadInt[playerid] = 0;
    PlayerDeadWorld[playerid] = 0;
    LoadedPatient[playerid] = INVALID_PLAYER_ID;
    Dim2D_Remove(PlayerReport, playerid);
    CheatTimer[playerid] = 5;
    for (new i = 0; i < 13; i ++)
    {
        PlayerWeapons[playerid][i] = 0;
        PlayerAmmo[playerid][i] = 0;
    }
    WarStats1[playerid] = 0;
    WarStats2[playerid] = 0;
    TogLC[playerid] = 1;
    TogAC[playerid] = 1;
    EnteredHouse[playerid] = 0;
    Hacked[playerid] = 0;
    PlayerInfo[playerid][pGPS] = 0;
    strmid(PlayerInfo[playerid][pSText], "NoText", 0, 255, 255);
    RentHouse[playerid] = 0;
    JobStep[playerid] = 0;
    PlayerInfo[playerid][pSQLID] = 0;
    AdTimer[playerid] = 0;
}
Reply
#6

Quote:
Originally Posted by Mionee
Посмотреть сообщение
pawn Код:
public OnPlayerConnect(playerid)
{
    PlayerSFC_Loaded[playerid] = 0;
    PlayerSFC[playerid] = 0;
    PlayerDead[playerid] = 0;
    PlayerDeadInt[playerid] = 0;
    PlayerDeadWorld[playerid] = 0;
    LoadedPatient[playerid] = INVALID_PLAYER_ID;
    Dim2D_Remove(PlayerReport, playerid);
    CheatTimer[playerid] = 5;
    for (new i = 0; i < 13; i ++)
    {
        PlayerWeapons[playerid][i] = 0;
        PlayerAmmo[playerid][i] = 0;
    }
    WarStats1[playerid] = 0;
    WarStats2[playerid] = 0;
    TogLC[playerid] = 1;
    TogAC[playerid] = 1;
    EnteredHouse[playerid] = 0;
    Hacked[playerid] = 0;
    PlayerInfo[playerid][pGPS] = 0;
    strmid(PlayerInfo[playerid][pSText], "NoText", 0, 255, 255);
    RentHouse[playerid] = 0;
    JobStep[playerid] = 0;
    PlayerInfo[playerid][pSQLID] = 0;
    AdTimer[playerid] = 0;
}
Thanks for answer.
is crash Pawno when i compile it
Reply
#7

the callback OnPlayerConnect must return 1

pawn Код:
public OnPlayerConnect(playerid)
{
    PlayerSFC_Loaded[playerid] = 0;
    PlayerSFC[playerid] = 0;
    PlayerDead[playerid] = 0;
    PlayerDeadInt[playerid] = 0;
    PlayerDeadWorld[playerid] = 0;
    LoadedPatient[playerid] = INVALID_PLAYER_ID;
    Dim2D_Remove(PlayerReport, playerid);
    CheatTimer[playerid] = 5;
    for (new i = 0; i < 13; i ++)
    {
        PlayerWeapons[playerid][i] = 0;
        PlayerAmmo[playerid][i] = 0;
    }
    WarStats1[playerid] = 0;
    WarStats2[playerid] = 0;
    TogLC[playerid] = 1;
    TogAC[playerid] = 1;
    EnteredHouse[playerid] = 0;
    Hacked[playerid] = 0;
    PlayerInfo[playerid][pGPS] = 0;
    strmid(PlayerInfo[playerid][pSText], "NoText", 0, 255, 255);
    RentHouse[playerid] = 0;
    JobStep[playerid] = 0;
    PlayerInfo[playerid][pSQLID] = 0;
    AdTimer[playerid] = 0;
    return 1;
}
try like this, and try to find if you're missing a closing bracket }
a missing CLOSING bracket does samp crash ^^
Reply
#8

Quote:
Originally Posted by Ramoboss
Посмотреть сообщение
the callback OnPlayerConnect must return 1

pawn Код:
public OnPlayerConnect(playerid)
{
    PlayerSFC_Loaded[playerid] = 0;
    PlayerSFC[playerid] = 0;
    PlayerDead[playerid] = 0;
    PlayerDeadInt[playerid] = 0;
    PlayerDeadWorld[playerid] = 0;
    LoadedPatient[playerid] = INVALID_PLAYER_ID;
    Dim2D_Remove(PlayerReport, playerid);
    CheatTimer[playerid] = 5;
    for (new i = 0; i < 13; i ++)
    {
        PlayerWeapons[playerid][i] = 0;
        PlayerAmmo[playerid][i] = 0;
    }
    WarStats1[playerid] = 0;
    WarStats2[playerid] = 0;
    TogLC[playerid] = 1;
    TogAC[playerid] = 1;
    EnteredHouse[playerid] = 0;
    Hacked[playerid] = 0;
    PlayerInfo[playerid][pGPS] = 0;
    strmid(PlayerInfo[playerid][pSText], "NoText", 0, 255, 255);
    RentHouse[playerid] = 0;
    JobStep[playerid] = 0;
    PlayerInfo[playerid][pSQLID] = 0;
    AdTimer[playerid] = 0;
    return 1;
}
try like this, and try to find if you're missing a closing bracket }
a missing CLOSING bracket does samp crash ^^
Thank u for answer.
OMG, is crash again

this is code after this for names :
pawn Код:
public OnPlayerConnect(playerid)
{
    // ONPLAYERCONNECT
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    if(strfind(playername, "_", true) != -1)
    {
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}SARP: {FFFFFF}Your name needs to be Role-Play! (For example: John_Smith) With NO numbers!");
        return Kick(playerid);
    }
    if(strfind(playername, "0", true) != -1 || strfind(playername, "1", true) != -1 || strfind(playername, "2", true) != -1 || strfind(playername, "3", true) != -1 || strfind(playername, "4", true) != -1 || strfind(playername, "5", true) != -1
    || strfind(playername, "6", true) != -1 || strfind(playername, "7", true) != -1 || strfind(playername, "8", true) != -1 || strfind(playername, "9", true) != -1)
    {
        SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}SARP: {FFFFFF}Your name needs to be Role-Play! (For example: John_Smith) With NO numbers!");
        return Kick(playerid);
    }
    PlayerSFC_Loaded[playerid] = 0;
    PlayerSFC[playerid] = 0;
    PlayerDead[playerid] = 0;
    PlayerDeadInt[playerid] = 0;
    PlayerDeadWorld[playerid] = 0;
    LoadedPatient[playerid] = INVALID_PLAYER_ID;
    Dim2D_Remove(PlayerReport, playerid);
    CheatTimer[playerid] = 5;
    for (new i = 0; i < 13; i ++)
    {
        PlayerWeapons[playerid][i] = 0;
        PlayerAmmo[playerid][i] = 0;
    }
    WarStats1[playerid] = 0;
    WarStats2[playerid] = 0;
    TogLC[playerid] = 1;
    TogAC[playerid] = 1;
    EnteredHouse[playerid] = 0;
    Hacked[playerid] = 0;
    PlayerInfo[playerid][pGPS] = 0;
    strmid(PlayerInfo[playerid][pSText], "NoText", 0, 255, 255);
    RentHouse[playerid] = 0;
    JobStep[playerid] = 0;
    PlayerInfo[playerid][pSQLID] = 0;
    AdTimer[playerid] = 0;
    // WELL STACKED PIZZA
   
    RemoveBuildingForPlayer(playerid, 1408, 2099.8516, -1813.9063, 13.1016, 0.25);
    RemoveBuildingForPlayer(playerid, 1408, 2099.8594, -1819.3594, 13.1016, 0.25);
    RemoveBuildingForPlayer(playerid, 1408, 2099.8594, -1799.4219, 13.1016, 0.25);
    RemoveBuildingForPlayer(playerid, 1408, 2102.6016, -1822.0781, 13.1172, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2104.0156, -1812.4219, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2101.9922, -1814.7109, 12.5703, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2103.4063, -1817.3047, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2102.1250, -1819.9531, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2101.6328, -1798.1719, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2103.9609, -1800.5625, 12.6719, 0.25);
Reply
#9

pawn Код:
public OnPlayerConnect(playerid)
{
    // ONPLAYERCONNECT
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    if(strfind(playername, "_", true) != -1)
    {
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}SARP: {FFFFFF}Your name needs to be Role-Play! (For example: John_Smith) With NO numbers!");
        return Kick(playerid);
    }
    if(strfind(playername, "0", true) != -1 || strfind(playername, "1", true) != -1 || strfind(playername, "2", true) != -1 || strfind(playername, "3", true) != -1 || strfind(playername, "4", true) != -1 || strfind(playername, "5", true) != -1
    || strfind(playername, "6", true) != -1 || strfind(playername, "7", true) != -1 || strfind(playername, "8", true) != -1 || strfind(playername, "9", true) != -1)
    {
        SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}SARP: {FFFFFF}Your name needs to be Role-Play! (For example: John_Smith) With NO numbers!");
        return Kick(playerid);
    }
    PlayerSFC_Loaded[playerid] = 0;
    PlayerSFC[playerid] = 0;
    PlayerDead[playerid] = 0;
    PlayerDeadInt[playerid] = 0;
    PlayerDeadWorld[playerid] = 0;
    LoadedPatient[playerid] = INVALID_PLAYER_ID;
    Dim2D_Remove(PlayerReport, playerid);
    CheatTimer[playerid] = 5;
    for (new i = 0; i < 13; i ++)
    {
        PlayerWeapons[playerid][i] = 0;
        PlayerAmmo[playerid][i] = 0;
    }
    WarStats1[playerid] = 0;
    WarStats2[playerid] = 0;
    TogLC[playerid] = 1;
    TogAC[playerid] = 1;
    EnteredHouse[playerid] = 0;
    Hacked[playerid] = 0;
    PlayerInfo[playerid][pGPS] = 0;
    strmid(PlayerInfo[playerid][pSText], "NoText", 0, 255, 255);
    RentHouse[playerid] = 0;
    JobStep[playerid] = 0;
    PlayerInfo[playerid][pSQLID] = 0;
    AdTimer[playerid] = 0;
    // WELL STACKED PIZZA
   
    RemoveBuildingForPlayer(playerid, 1408, 2099.8516, -1813.9063, 13.1016, 0.25);
    RemoveBuildingForPlayer(playerid, 1408, 2099.8594, -1819.3594, 13.1016, 0.25);
    RemoveBuildingForPlayer(playerid, 1408, 2099.8594, -1799.4219, 13.1016, 0.25);
    RemoveBuildingForPlayer(playerid, 1408, 2102.6016, -1822.0781, 13.1172, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2104.0156, -1812.4219, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2101.9922, -1814.7109, 12.5703, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2103.4063, -1817.3047, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2102.1250, -1819.9531, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2101.6328, -1798.1719, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2103.9609, -1800.5625, 12.6719, 0.25);
    return 1;
}
you're missing a bracket, if it's not that bracket
put your whole GameMode here : http://codegenerators.pl/
and it will give you the right indentation and the missing bracket ^^
Reply
#10

Quote:
Originally Posted by Ramoboss
Посмотреть сообщение
pawn Код:
public OnPlayerConnect(playerid)
{
    // ONPLAYERCONNECT
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    if(strfind(playername, "_", true) != -1)
    {
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}SARP: {FFFFFF}Your name needs to be Role-Play! (For example: John_Smith) With NO numbers!");
        return Kick(playerid);
    }
    if(strfind(playername, "0", true) != -1 || strfind(playername, "1", true) != -1 || strfind(playername, "2", true) != -1 || strfind(playername, "3", true) != -1 || strfind(playername, "4", true) != -1 || strfind(playername, "5", true) != -1
    || strfind(playername, "6", true) != -1 || strfind(playername, "7", true) != -1 || strfind(playername, "8", true) != -1 || strfind(playername, "9", true) != -1)
    {
        SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}SARP: {FFFFFF}Your name needs to be Role-Play! (For example: John_Smith) With NO numbers!");
        return Kick(playerid);
    }
    PlayerSFC_Loaded[playerid] = 0;
    PlayerSFC[playerid] = 0;
    PlayerDead[playerid] = 0;
    PlayerDeadInt[playerid] = 0;
    PlayerDeadWorld[playerid] = 0;
    LoadedPatient[playerid] = INVALID_PLAYER_ID;
    Dim2D_Remove(PlayerReport, playerid);
    CheatTimer[playerid] = 5;
    for (new i = 0; i < 13; i ++)
    {
        PlayerWeapons[playerid][i] = 0;
        PlayerAmmo[playerid][i] = 0;
    }
    WarStats1[playerid] = 0;
    WarStats2[playerid] = 0;
    TogLC[playerid] = 1;
    TogAC[playerid] = 1;
    EnteredHouse[playerid] = 0;
    Hacked[playerid] = 0;
    PlayerInfo[playerid][pGPS] = 0;
    strmid(PlayerInfo[playerid][pSText], "NoText", 0, 255, 255);
    RentHouse[playerid] = 0;
    JobStep[playerid] = 0;
    PlayerInfo[playerid][pSQLID] = 0;
    AdTimer[playerid] = 0;
    // WELL STACKED PIZZA
   
    RemoveBuildingForPlayer(playerid, 1408, 2099.8516, -1813.9063, 13.1016, 0.25);
    RemoveBuildingForPlayer(playerid, 1408, 2099.8594, -1819.3594, 13.1016, 0.25);
    RemoveBuildingForPlayer(playerid, 1408, 2099.8594, -1799.4219, 13.1016, 0.25);
    RemoveBuildingForPlayer(playerid, 1408, 2102.6016, -1822.0781, 13.1172, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2104.0156, -1812.4219, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2101.9922, -1814.7109, 12.5703, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2103.4063, -1817.3047, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2102.1250, -1819.9531, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2101.6328, -1798.1719, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1432, 2103.9609, -1800.5625, 12.6719, 0.25);
    return 1;
}
you're missing a bracket, if it's not that bracket
put your whole GameMode here : http://codegenerators.pl/
and it will give you the right indentation and the missing bracket ^^
again Crash Pawno
how use it : http://codegenerators.pl/ ? i put code i click on converter nothing work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)