if (strcmp(cmd, "/god", true)==0) { new tmp[256], string[256]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { if(gGod[playerid] == 1){ format(string, sizeof(string), "Godmode of %s is now turned OFF", gName[playerid]); SendClientMessage(playerid, COLOR_SYSTEM, string); gGod[playerid] = 0; SetPlayerHealth(playerid, 100); } else { format(string, sizeof(string), "Godmode of %s is now turned ON", gName[playerid]); SendClientMessage(playerid, COLOR_SYSTEM, string); gGod[playerid] = 1; SetPlayerHealth(playerid, 9999999999); } return 1; } else { if(FindUser(tmp)){ new id = GiveID(tmp); if(gGod[id] == 1){ new pName[24]; GetPlayerName(id,pName,24); format(string, sizeof(string), "Godmode of %s is now turned OFF", pName); SendClientMessage(playerid, COLOR_SYSTEM, string); gGod[id] = 0; SetPlayerHealth(id, 100); } else { new pName[24]; GetPlayerName(id,pName,24); format(string, sizeof(string), "Godmode of %s is now turned ON", pName); SendClientMessage(playerid, COLOR_SYSTEM, string); gGod[id] = 1; SetPlayerHealth(id, 9999999999); } } else { format(string, sizeof(string), "Godmode target not found or multiple targets found (%s)", tmp); SendClientMessage(playerid, COLOR_SYSTEM, string); } } return 1; }