12.05.2015, 20:25
Hello guys,i need help with the registration system,so i wanted to make a directory just for Users but this is causing me problems i dont know to make a similar UserPath just for the Users what should i change in the udb
When player connects it always checks this: if(udb_Exists(PlayerName(playerid))) so i would like to make a UserPath for it
When player connects it always checks this: if(udb_Exists(PlayerName(playerid))) so i would like to make a UserPath for it
Код:
stock NickCheck(playerid, value) { if(udb_Exists(PlayerName(playerid))) { if(dUserINT(PlayerName(playerid)).("famid")==COPS || dUserINT(PlayerName(playerid)).("factnumber")==SASF || dUserINT(PlayerName(playerid)).("power") >= 1) return 0; } if(strfind(PlayerName(playerid), "_", true)==-1) { new giveplayerid = playerid; SendClientMessage(giveplayerid, COLOR_YELLOW, " "); SendClientMessage(giveplayerid, COLOR_YELLOW, " "); SendClientMessage(giveplayerid, COLOR_YELLOW, " You have been kicked for having an invalid roleplay name format."); SendClientMessage(giveplayerid, COLOR_YELLOW, " Valid formats would be: John_Anderson, Corey_Hawk, Dany_Collins"); SendClientMessage(giveplayerid, COLOR_YELLOW, " Please chose another name, and feel free to come back!"); SendClientMessage(giveplayerid, COLOR_YELLOW, " "); SendClientMessage(giveplayerid, COLOR_YELLOW, " "); new string[ 164 ]; format(string, sizeof(string), "[ADMIN INFO] %s [%d] has been kicked for an invalid name format.", PlayerName(playerid), playerid); PlayerLoop(i) if(PlayerInfo[i][power]>0 && value == 1) SendClientMessage(i, COLOR_HELPEROOC, string); PlayerTemp[playerid][tokick]=1; SetTimerEx("ToKick",500,0,"i",playerid); return 1; } return 0; }