05.07.2016, 19:18
So lately I've developed a CnR Points system.What this does for e.g if you have 1000 CnRP you are able to join classes that require 1000 CnRP or less.I wrote the code, compiles fine but even if I have the requested CnRP for the class I can't join it and btw the error message wont appear too.Does anyone have any ideas how to fix it?
PHP код:
public OnPlayerRequestSpawn(playerid)
{
switch(pInfo[playerid][Class])
{
case CLASS_FBI:
{
if(pInfo[playerid][CnRP] > 10000)
{
SendClientMessage(playerid, -1, "{AA3333}[ERROR] {FFFFFF}You must have {FFFF00}10,000 CnR Points to join the FBI class");
return 1;
}
}
case CLASS_CIA:
{
if(pInfo[playerid][CnRP] > 15000)
{
SendClientMessage(playerid, -1, "{AA3333}[ERROR] {FFFFFF}You must have {FFFF00}15,000 CnR Points to join the CIA class");
return 1;
}
}
case CLASS_MILITARY:
{
if(pInfo[playerid][CnRP] > 25000)
{
SendClientMessage(playerid, -1, "{AA3333}[ERROR] {FFFFFF}You must have {FFFF00}20,000 CnR Points to join the Military class");
return 1;
}
}
}
return 1;
}