15.05.2010, 15:02
1. If OnPlayerRequestSpawn returns 0, is it possible through a glitch or hack to still spawn?
2. Are these both secure?
public OnPlayerRequestSpawn(playerid)
{
if(GetPVarInt(playerid, "logged_in") == 1)
{
return 1;
}
else
{
Login_Box(playerid);
return 0;
}
}
and
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid, "logged_in") == 1)
{
SetPlayerSpawnDetails(playerid);
return 1;
}
else
{
System_Kick(playerid, "Spawned Without Logging In");
return 0;
}
}
3. Is it necessary to have the if/else in OnPlayerSpawn?
2. Are these both secure?
public OnPlayerRequestSpawn(playerid)
{
if(GetPVarInt(playerid, "logged_in") == 1)
{
return 1;
}
else
{
Login_Box(playerid);
return 0;
}
}
and
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid, "logged_in") == 1)
{
SetPlayerSpawnDetails(playerid);
return 1;
}
else
{
System_Kick(playerid, "Spawned Without Logging In");
return 0;
}
}
3. Is it necessary to have the if/else in OnPlayerSpawn?