Jump to content

Question

Posted

Salut, ResetPlayerWeapon() din commanda asta se apeleaza pre tarziu si intra pe "if", cum as putea sa fac sa ii dea reset si sa intre direct pe "else"?

CMD:exit(playerid, params[]){
	ResetPlayerWeapons(playerid);
	new Float:hp; GetPlayerHealth(playerid, hp);
	if(joinEvent[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "ERROR: {FFFFFF}You didn't join an event.");
	if(hp < 50) return SendClientMessage(playerid, COLOR_RED, "What are you doing? Stay in battle untill you die for real.");
	if(GetPlayerWeapon(playerid) != 0){
		GetPlayerName(playerid, pname, sizeof(pname));
		format(strings, sizeof(strings), "Admin-Log: %s can't exit the event because he still has some weapons.", pname);
		SendAdminMessage(COLOR_LIME, strings);
		SendClientMessage(playerid, COLOR_RED, "WARNING! You may get banned if you don't get rid of the current weapons!");
	}else{
		joinEvent[playerid] = 0;
	 	weapongiven[playerid] = 0;
		SetPlayerArmour(playerid, 0);
		SetPlayerVirtualWorld(playerid, 0);
		SetPlayerPos(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]);
		SendClientMessage(playerid, COLOR_YELLOW, "That was nice, join again soon!");
	}
	return 1;
}

signature.php?bg=000000&text=FFFFFF&border=a0a0a0&ip=176.31.142.87&port=7777&bg_image=

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.