public OnPlayerConnect()
{
new file[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "/applies/%s.ini", pname);
if(dini_Exists(file)) return SendClientMessage(playerid, red, "You have already made your application!");
format(file, sizeof(file), "/applies/%s.ini", pname);
if (!fexist(file)) return SendClientMessage(playerid,green,"Wanna apply for Administrator ? Type /aa for a IN-GAME Admin Apply!!");
return 1;
}
public OnPlayerConnect(playerid)
Originally Posted by Zezombia
Your getting playerid errors because it's not defined. Change the callback to:
pawn Code:
See if that helps, then report back. |
public OnPlayerConnect(playerid)
{
new file[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "/applies/%s.ini", pname);
if(dini_Exists(file)) return SendClientMessage(playerid, red, "You have already made your application!");
if (!fexist(file)) return SendClientMessage(playerid,green,"Wanna apply for Administrator ? Type /aa for a IN-GAME Admin Apply!!");
return 1;
}
if (!fexist(file))
if(!dini_Exists(file))
Originally Posted by Zezombia
Me nether, but you could always change:
pawn Code:
pawn Code:
|
Originally Posted by Zezombia
Well I wasn't gonna mention this because I thought I was missing something but:
What about the fact that your not actually writing anything to a file? Your only checking if it exists. |
Originally Posted by Zezombia
Could I see that code please? It's probably something to do with creating the file, not checking it.
|
/*============================================
Admin Application IN-GAME FilterScript! |
Made by Rafay! |
If you use it, Please give me some credits |
|
==============================================*/
//[Includes]
#include <a_samp>
#include <dudb>
#include <dini>
#pragma unused ret_memcpy
//[Defines]
#define green 0x33AA33AA
#define red 0xAA3333AA
#define blue 0x0000BBAA
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Admin Application IN-GAME Loaded!");
print("--------------------------------------\n");
return 1;
}
public OnPlayerConnect(playerid)
{
new file[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "/applies/%s.ini", pname);
if(!dini_Exists(file)) return SendClientMessage(playerid, red, "You have already made your application!");
if (!fexist(file)) return SendClientMessage(playerid,green,"Wanna apply for Administrator ? Type /aa for a IN-GAME Admin Apply!!");
return 1;
}
Originally Posted by Seif_
Does the folder "applies" even exist? And decrease the array size from 256 to 64 at least...
|
Originally Posted by Seif_
No, but it's better.
pawn Code:
|
Originally Posted by Seif_
I updated my post. I forgot to fill fexist.
|