• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ help with this code please bros

darknelson

Member
Joined
Jun 19, 2011
Messages
190
Solutions
1
Reaction score
15
im trying to make a code when target got storage value on 1, cant be attacked, and cant attack, help me please

Lua:
int32_t value;
    if (targetPlayer->getStorageValue(77777412, value)){
        if (value == 1) {
            return RETURNVALUE_TURNSECUREMODETOATTACKUNMARKEDPLAYERS;
        }
    }
    if (attackerPlayer->getStorageValue(77777412, value)){
        if (value == 1) {
            return RETURNVALUE_TURNSECUREMODETOATTACKUNMARKEDPLAYERS;
        }
    }


i did it with that 2 codes get the result i want, can be done in one?
 
Last edited:
C++:
	int32_t value = 0;
	targetPlayer->getStorageValue(77777412, value)
	
    if (value == 1) {
        return RETURNVALUE_TURNSECUREMODETOATTACKUNMARKEDPLAYERS;
    }

	value = 0;
	attackerPlayer->getStorageValue(77777412, value)

    if (value == 1) {
        return RETURNVALUE_TURNSECUREMODETOATTACKUNMARKEDPLAYERS;
    }
 
Back
Top