- 0
ResetPlayerWeapon
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
bogdan.trial
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; }2 answers to this question
Recommended Posts