12.09.2015, 22:16
PHP код:
if (strcmp(cmd, "/equiparorgvip", true) == 0) {
if (IsPlayerConnected(playerid)) {
new File[64];
format(File, sizeof(File), "OrgsVIP/%i.ini", PlayerInfo[playerid][pMembro]);
if(DOF2_FileExists(File)) {
if(IsPlayerInRangeOfPoint(playerid, 2.0, DOF2::GetFloat(File, "Posicao X"), DOF2::GetFloat(File, "Posicao Y"), DOF2::GetFloat(File, "Posicao Z")) ) {
switch(tenhoumaorg(playerid)) {
case 1: equiparOrg(playerid);
case 2: equiparOrg(playerid);
case 3: equiparOrg(playerid);
case 4: equiparOrg(playerid);
case 5: equiparOrg(playerid);
case 6: equiparOrg(playerid);
case 7: equiparOrg(playerid);
case 8: equiparOrg(playerid);
case 9: equiparOrg(playerid);
case 10: equiparOrg(playerid);
case 11: equiparOrg(playerid);
case 12: equiparOrg(playerid);
case 13: equiparOrg(playerid);
case 14: equiparOrg(playerid);
case 15: equiparOrg(playerid);
case 16: equiparOrg(playerid);
case 17: equiparOrg(playerid);
case 18: equiparOrg(playerid);
case 19: equiparOrg(playerid);
case 20: equiparOrg(playerid);
case 21: equiparOrg(playerid);
case 22: equiparOrg(playerid);
case 23: equiparOrg(playerid);
case 24: equiparOrg(playerid);
}
}
}
}
return true;
}
PHP код:
stock tenhoumaorg(playerid)
{
new org;
if(PlayerInfo[playerid][pLider] > 0)
{
org = PlayerInfo[playerid][pLider];
return org;
}
if(PlayerInfo[playerid][pMembro] > 0)
{
org = PlayerInfo[playerid][pMembro];
return org;
}
return 0;
}